Bastion — AI-Native Company Brain & Agentic OS
The ecosystem front door: a five-layer agentic operating system — Console, Engine, Brain, Factory, Surface — composed from ten independently-versioned repos.
Overview
Bastion isn't a wrapper around an LLM. It's a five-layer operating system for commanding many autonomous agents from a single seat: a strict SDLC Factory that builds the software, an Engine that executes agent workflows, a semantic-graph Brain that stays provably current, a real-time Console to observe and steer, and a phone Surface to do it untethered. The system is deliberately not a monorepo. Ten repositories — spanning Rust, Python, and Flutter — keep their own git histories, test suites, and release cadences, and compose through a small number of versioned, one-way API seams. This repo (bastion-os) is the front door: the architecture, the Mermaid system diagram, and the links out to every module. The five layers: the Console (bastion, Rust) is the operator's seat — sessions, live cost and budget, a kill switch, and brain queries; the Engine (orchestrator in Python, engine-rs in Rust) executes DAG-validated agent workflows; the Brain (mev + pgvector) is the context layer, where mev is the single reference parser for the company's file formats and what it validates is exactly what gets embedded; the Factory (base-template) is the SDLC harness that scaffolds every spec into isolated git worktrees; and the Surface (bastion-ui, Flutter) is the untethered mobile operator, driving the whole system over Tailscale via a versioned HTTP + WebSocket API. The guiding principle is architectural, not feature-driven: a solo-run system fails not from missing features but from self-knowledge drift — hand-maintained views lagging reality, multiple parsers of the same formats, a semantic index that's never current. Bastion is designed against that failure mode first: one parser (okf-core, a shared contract crate), one writer of derived state, and a Brain where validated == embedded == derived.
Technical Stack
Console
- ▸bastion (Rust) — mission-control TUI
- ▸bella — Console-family TUI framework
- ▸sessions · live cost/budget · kill switch
Engine
- ▸orchestrator (Python) — DAG workflows, Celery
- ▸engine-rs (Rust) — native async engine
- ▸claude-code-rs — defensive CLI wrapper
Brain
- ▸mev — corpus/graph reference parser
- ▸pgvector — semantic store
- ▸okf-core — shared contract crate
Factory
- ▸base-template — SDLC harness
- ▸/sdlc-flow pipeline
- ▸isolated git worktrees
Surface
- ▸bastion-ui (Flutter) — mobile operator
- ▸Riverpod · WebSocket
- ▸Tailscale remote access
Key Features
Five decoupled repos (Rust, Python, Flutter) composing into one operating system through versioned API seams — not a monorepo
Console-through-Engine control: the cost → budget → kill loop is enforced across a one-way API seam, never around it
Provably-current Brain: what mev validates is exactly what gets embedded — no hand-maintained view is allowed to drift from source
One parser for every company file format (okf-core), shared by Console and Brain — no divergent re-implementations
Untethered operation: drive the entire system from a phone over Tailscale via bastion serve (HTTP + WebSocket)
Technical Challenges
Architecting against self-knowledge drift — the failure mode of a solo-run system where hand-maintained views, duplicate parsers, and a stale index quietly diverge from the source of truth
Uniting ten repos with isolated git histories into one coherent public showcase without merging them or leaking private planning