Before anything else:
Can this feature exist entirely outside
engine.rs?
If yes — it does not belong in engine.rs. Full stop.
engine.rs is the TCB. Its value comes from being small, deterministic, and formally verifiable.
Every line added to it is a line that must be formally verified or it weakens the entire system.
A 200-line TCB is worth something. A 2000-line TCB is worth nothing.
See TCB.md for the full boundary definition.
- New adapters for LLM frameworks (OpenAI, Anthropic, LangChain, AutoGen, etc.)
- New extension layers (new heuristic detectors, conflict strategies, policy engines)
- New language bindings (TypeScript, Java, Swift, etc.)
- New integration examples
- Bug fixes in extensions
- Documentation improvements
Very rarely, and only when:
- The change enforces a new formally-stated invariant
- The change cannot exist anywhere else by construction (not just convenience)
- The change keeps engine.rs ≤ 300 LOC
- The change adds zero interpretation, heuristics, or non-determinism
Examples of TCB-eligible changes:
- Adding a new typed
CapabilityKindvariant (one line, algebra only) - Fixing a logical error in an existing invariant check
- Adding a new sovereignty flag with clear formal semantics
Examples that are NOT TCB-eligible (regardless of how reasonable they sound):
- "Add a regex to detect prompt injection in action descriptions"
- "Add a confidence threshold for when to bypass a flag"
- "Add a scheduler to decide action ordering"
- "Add a logging callback for debugging"
- "Add a config option to relax the ownerless machine check for testing"
- Changes that weaken the 10 sovereignty flags
- Removal or weakening of the A4, A6, or A7 checks
- "Emergency exception" paths that bypass the verifier
- NLP, ML inference, or semantic interpretation inside
engine.rs - Any change that makes
engine.rsnon-deterministic
These will be rejected regardless of stated motivation — including performance, emergencies, edge cases, or backwards compatibility.
- Fork → branch → PR against
main - Fill out the PR template — including the TCB Gate section if touching TCB files
- All tests must pass:
pytest --cov=authgate --cov-fail-under=85 - Lint must pass:
ruff check src tests - CI must pass: this includes the LOC guard and purity check on
engine.rs
pip install -e ".[dev]"
pytestIf you are adding a new feature that lives in extensions/, add tests in tests/.
If you believe something belongs in the TCB, open an issue first — do not open a PR directly.