Explicit contractsTypes and validation at the boundary
Typed failuresExpected errors in the return value
Open sourceMIT-licensed, built in the open
Start with the framework
btravstack
From a proven dependency graph to a running service. The kernel owns startup, units of work and graceful shutdown. Your application owns the business logic.
Declare your domain once. Derive types and request/response schemas from a field map, with sealed construction and behavior that stays with the entity.
Declare ports, bind providers, compose modules. Check the wiring before the process starts and keep implementation details private. Part of the framework; usable on its own.
Each package is small, focused and does one thing well — but they share a worldview: expressive code you can understand from its signature alone, and robust code that fails fast enough to learn from.
01
The signature is the doc
A contract or a function signature should be enough to understand a system. Declare the interface once and read everything from it — no digging into implementations.
02
Fail fast, everywhere
The sooner the error, the better the code. Anticipated failures are values in the type, malformed data stops at the boundary, missing wiring is a compile error.
03
Coherence at a high level
Contracts pin down how the pieces fit — publisher and consumer, workflow and client, module and dependency can't drift apart while implementations change underneath.
Better feedback for humans and agents.
Clear contracts make both human and AI-assisted work easier to check. The compiler is one feedback loop, alongside tests, runtime validation and review.
The tightest feedback loop
An agent is only as good as the signal it gets back. Fail-fast code turns a wrong guess into a precise error in seconds — and fast errors are what make iteration converge.
One clear signal
Typechecking gives generated code a reproducible check against your declared contracts. It catches mismatches early; it does not prove the program is correct.
Review at the contract level
Expressive contracts carry the intent. You review interfaces while the AI churns through implementations — the compiler checks the connections. Tests and human review still check the behavior.
Standing on good shoulders.
BtravStack borrows its instincts from the libraries that made TypeScript feel this way in the first place.