Skip to content

Architecture

Entrance is not another AI wrapper. It is an operating system layer that introduces determinism into the inherently uncertain world of AI agents.

PrincipleMeaning
Cold/Hot Dual-TrackCold layer = canonical truth (DB). Hot layer = active surface (UI/files). Any design decision starts by separating fact from view.
Empty Core + Plugin EverythingCore has zero business logic. All functionality comes from plugins.
Single Source of TruthEntrance is not just a view layer — it is the data source. External services read/write Entrance DB.
OTP-Derived Supervisionmax_retry + report + no_silent_failure. Every failure must remain visible; recovery never erases incident history.

Entrance keeps three pillars as the architectural foundation:

Defines the hard capability boundaries of the system. Authority separation is a single-writer problem, not a courtesy rule:

  • Runtime enforces writer, route, gate, and sandbox constraints structurally
  • Lower execution roles run inside bounded rooms or worktrees
  • Human may stop or replace inner execution, but cannot semantically steer a live instance through hidden writes

A whole-system state machine where all roles coexist:

  • Canonical state families: FLOW_PHASE / ATTENTION_STATE / INTEGRITY_OVERLAY
  • Upward promotion is evidence-gated — simulation is mandatory, not an optional claim
  • Transport lanes (SUBMISSION / EXCEPTION / RETURN) are attached to ownership transfer edges

Turns role semantics into enforceable constraints:

  • Registry triple: object_kind / state_code / control_policy
  • Compiler IR distinguishes: model-authored / runtime-derived / runtime-only
  • Hard routing belongs to compiled control semantics, not after-the-fact review
RoleSlotResponsibilityWrites Code?
HumanSovereigntyDirection + acceptance
NOTABoundarychat / learn / do — sole semantic entry/exit for Human
Policy (Arch)StrategyWhat + Why
Operation (Dev)Execution MgmtHow + Quality✅ conflict fix
Execution (Agent)Codingread / make / report✅ primary

Slogan: max_retry + report + no_silent_failure

  • 4 typed runtime signals: Execution Failure, Admission Rejection, Verdict Return, Integrity
  • Only Execution Failure consumes automatic retry budget
  • Retry exhaustion → Blocked (not Failed)
  • Strategy by coupling: one_for_one / rest_for_one / one_for_all
  • Recovery ≠ nothing happened — incident visibility must be preserved
SubsystemResponsibility
PluginManagerDiscover / load / activate / deactivate plugins
EventBusInter-plugin pub/sub: {scope}:{action}
DataStoreSQLite abstraction, per-plugin isolated tables
ConfigStoreTOML read/write
PermissionGuardRuntime permission checking (L0–L4)
ActionCompilerCompile surface actions into constrained action records
SupervisionKernelOTP supervision: child policy, retry budget, escalation
MCPServerExpose all plugin capabilities as MCP tools
WindowManagerTauri multi-window lifecycle