FrankenTerm

The README, ft 0.15.21

The documentation.

The whole FrankenTerm README, split into 82 pages: about 29,000 words on commands, Robot Mode, configuration, architecture and 44 deep dives. Every link inside it still works.

Where to start

New here

What ft is, ten minutes of commands, and what it does not do yet.

TL;DRTourInstallLimitations

You run agents

Watching panes, rules, workflows, and what to do when something goes wrong.

CommandsDetectionPlaybookTroubleshooting

You build meta-agents

JSON and TOON envelopes, the MCP server, and the policy gate in front of every send.

Robot ModeTOONPolicyWorkflows

You operate at scale

Admission, memory tiers, transactions and incident bundles.

EnvelopeMemoryTransactionsIncidents

You want the internals

The architecture, the async runtime, the storage schema and the algorithms.

ArchitectureCx modelStorageAlgorithms

You audit claims

What ships, what is partial, and how each claim maps to an artifact.

Surface matrixSafetyEngineeringBenchmarks

Start here

10 pages

Use it

12 pages
16 parts2,171 wordsCommands

ft attention ranks what needs an operator or agent next, without changing anything. Without --input it reads live sources:

14 parts701 wordsRobot Mode (JSON API)

The ft robot subcommand provides machine-optimized output for AI agents. Always use --format toon for token-efficient output when piping results to another AI.

1 parts109 wordsConfiguration

Configuration is discovered in canonical precedence order:

One part199 wordsOperating Envelope

The operating envelope contract is the system's answer to is it safe to do more work right now?

One part162 wordsMission Objective Planner

ft mission objective-plan invokes the capacity-aware mission objective planner (ft-auy2g). Inputs and behavior:

One part229 wordsIncident Bundles

When something goes wrong (a crash, a stuck pane, a fleet-wide degradation), ft packages what it knows into an incident bundle . ft reproduce export runs as its own process, so sources that only a running watcher…

2 parts294 wordsCompile-Time Feature Matrix

The ft binary ( -p frankenterm ) turns nearly every surface on by default; the features exist so trimmed builds still compile. Defaults below come from crates/frankenterm/Cargo.toml .

7 parts406 wordsOperator Playbook Excerpts

Curated runbook fragments. The full operator playbook lives in docs/operator-playbook.md ; these excerpts are the highest-frequency ones.

3 parts218 wordsPattern Detection

ft detects state transitions across multiple AI coding agents:

5 parts309 wordsObservability Surfaces

ft is designed to be observable from the outside in five distinct ways. Each is useful in a different operational context.

One part199 wordsSecure Distributed Mode

Secure distributed mode is compiled into default builds ( distributed is in the default Cargo feature set of crates/frankenterm/Cargo.toml ) and activated at runtime via [distributed].enabled = true . To build a…

7 parts265 wordsTroubleshooting

For a step-by-step operator guide (triage → why → reproduce), see docs/operator-playbook.md .

How it works

6 pages

Deep dives

44 pages
One part173 wordsBayesian Regime Detection (BOCPD)

Regex patterns catch known failure modes. But what about novel failures that nobody wrote a pattern for? ft includes a Bayesian Online Change-Point Detection (BOCPD) engine that detects statistical regime changes in…

One part175 wordsProbabilistic Data Structures

Several subsystems use space-efficient probabilistic data structures to avoid costly exact lookups:

One part273 wordsSession Persistence and Restore

The session-restoration library/test substrate can identify sessions that did not shut down cleanly ( shutdown_clean = 0 ), load a checkpoint, and exercise a restore state machine:

One part117 wordsDisaster Recovery Drills

The disaster_recovery_drills module provides structured, repeatable DR drill scenarios that exercise the backup/restore pipeline and measure RTO/RPO compliance. Each drill scenario specifies:

One part227 wordsConnection Pool and Circuit Breaker

The mux connection pool reduces overhead by reusing persistent connections to the WezTerm mux server. Key design choices:

4 parts384 wordsPattern Engine Architecture

The pattern engine is a four-stage filter chain optimized for the common case (most text matches zero rules):

4 parts271 wordsSearch Modes — Lexical, Semantic, Hybrid

ft search and ft robot search support three modes, selected via --mode :

5 parts330 wordsPolicy Engine

The policy engine sits between every action and its target. Its job: turn a request like send text to pane 7 into a decision: Allow , Deny , or RequireApproval .

4 parts222 wordsWorkflow Engine

A workflow is a registered handler that triggers on detected patterns. The engine runs them safely:

4 parts165 wordsTransactional Mission Execution

Multi-pane operations use a prepare/commit/compensate lifecycle borrowed from distributed transaction protocols.

5 parts466 wordsFleet Memory Controller

The fleet memory controller synthesizes pressure from three independent subsystems into a single 4-tier model that drives uniform action across the system.

5 parts242 wordsThree-Tier Scrollback

In a simple sizing model, 200 panes retaining roughly 20 MB of uncompressed backbuffer each consume about 4 GB before other process costs. That is an illustrative calculation, not a measured comparison against every…

3 parts196 wordsDistributed Wire Protocol

Distributed mode lets remote hosts stream pane state into an aggregator. The wire protocol is designed defensively: every input is validated, dedup'd, and bounded.

4 parts203 wordsRuntimeProof Sealed Trait

The no tokio rule is enforced at three layers: dependency (cargo-deny), test (CI checks), and type (RuntimeProof sealed trait).

4 parts204 wordsAttestation Bundle Format

A release attestation bundle is a content-addressed, Sigstore-signed JSON file under docs/attestations/ version .json . Its job: prove that every load-bearing README/AGENTS claim is backed by a hash-verified artifact.

4 parts232 wordsThe Watcher Capture Loop

ft watch runs the main capture loop that produces every byte of observed data. Understanding the loop is essential to understanding what ft is doing while it's doing nothing visible.

6 parts540 wordsStorage Schema and Migration Strategy

ft stores everything in a single SQLite database. The schema is versioned and migrations are tracked.

4 parts267 wordsRecorder and Replay

Beyond delta capture, ft has a separate recorder subsystem that produces high-fidelity execution traces, and a replay harness that runs those traces back deterministically. Together they enable post-incident…

4 parts341 wordsConnector Fabric

The connector subsystem lets ft talk to external systems (issue trackers, monitoring, secret stores, log aggregators, custom internal services) through a unified bridge model.

4 parts253 wordsAgent Profiles, Personas, and Fleet Templates

A profile is a reusable specification of a pane: which agent (codex / claude_code / gemini), what cwd, what env overrides, what session settings, what tools it can use. Profiles let you say spawn 3 of codex_ws…

4 parts321 wordsThe Cx Cancellation Model

Cx is asupersync's capability and cancellation context. When FrankenTerm threads it explicitly through a call graph, it preserves typed cancellation, deadline, budget, and capability state at each audited operation…

4 parts256 wordsError Taxonomy

Every ft error is a typed envelope with a stable code, a human-readable message, and an optional actionable hint. The taxonomy is operator-readable and machine-routable.

3 parts159 wordsResource Pressure Cockpit

When operators see high memory, the cockpit contract demands they classify the residency source first. The contract is at docs/resource-pressure-cockpit-contract.md .

3 parts206 wordsMux Server Federation

frankenterm-mux-server is the headless mux daemon. frankenterm-mux-server-impl houses the shared implementation. Together they enable federated multi-host setups where one operator runs the GUI / Robot Mode and…

4 parts225 wordsNative Event Bridge (push mode)

The default capture mode is poll: ft watch queries the mux for pane state every poll_interval_ms . A complementary push mode is available when the native event bridge is wired up.

3 parts192 wordsWASM Extension Surface (type substrate; runtime not yet wired)

ft has a typed extension contract surface in extensions.rs designed for out-of-process WASM execution via wasmtime (component-model, async, std). The wasmtime runtime itself is not yet wired in the current shipped…

4 parts246 wordsNotification Pipeline

When detections fire, ft watch can notify operators through desktop notifications and webhooks.

3 parts210 wordsIPC and Local Auth

ft exposes a local IPC surface so the Robot Mode CLI and the watcher can talk to each other without going through the database for every request (the GUI does not use it yet).

4 parts144 wordsBackup, Restore, and Retention

Each backup uses the SQLite online backup API for a consistent snapshot. The output archive contains:

3 parts244 wordsFormal Methods in This Repo

The project uses formal methods where they earn their keep, typically on invariant-critical paths where the cost of an undetected bug is high.

6 parts243 wordsTOON Encoding

TOON (Token-Optimized Object Notation) is a compact tree serialization optimized for AI-to-AI envelopes. The goal is fewer tokens for the same payload when the consumer is an LLM, not byte-level compression.

One part243 wordsTerminal Emulator Capabilities

ft inherits its terminal-emulation surface from the vendored term + termwiz crates. The discipline here is implement upstream WezTerm correctness, then patch fixes upstream-wards. Recent correctness work:

3 parts524 wordsRecording vs Replay vs Snapshot vs Backup

These four words refer to four distinct mechanisms. They are often conflated; the codebase treats them as separate concerns.

5 parts164 wordsPane Filter Rules

[ingest.panes] lets you control which panes the watcher observes. Filter rules are deterministic; ft list --json and ft robot state report each pane's observed flag and, for an excluded pane, its ignore_reason .

4 parts318 wordsCapacity Planning

Provisional sizing hypotheses gathered from operator practice and the perf substrate. They are inputs to measurement, not qualified upper bounds. In particular, the 100/200-pane memory rows are synthetic…

5 parts367 wordsSignal Handling and Clean Shutdown

ft watch attempts a bounded clean shutdown for catchable signals and reports an unclean result when task acknowledgement or storage flush does not finish. SIGKILL , blocking OS work, and independently delegated work…

4 parts125 wordsThe .ft Directory and Platform Layout

ft manages workspace-local state under .ft/ in the workspace root, while global defaults and shared tooling follow OS platform conventions.

7 parts293 wordsasupersync Primitive Reference

The runtime_async module re-exports asupersync primitives with project-curated ergonomics. Quick reference for what's available:

2 parts162 wordsBuilt-in Workflow Handler Catalog

The workflow engine ships with the following built-in handlers ( crates/frankenterm-core/src/workflows/ ):

3 parts129 wordsSaved Searches and Scheduled Queries

ft search saved lets operators bookmark FTS queries and optionally schedule them to re-run periodically.

4 parts150 wordsNotification Identity Keys

A notification identity key is the deduplication primitive for the notification pipeline. Two notifications with the same identity key are treated as duplicates and the second is suppressed (subject to the throttling…

4 parts340 wordsThreat Model

What ft is designed to resist, and what's explicitly out of scope.

2 parts240 wordsSample Mission and Tx Contracts

For operators writing their first mission or tx contract, the authoritative shapes are the Rust types in crates/frankenterm-core/src/plan.rs — pub struct Mission ( MISSION_SCHEMA_VERSION = 2 ) and pub struct…

One part169 wordsGUI Render State

The native GUI ( frankenterm-gui , shipped as FrankenTerm.app on macOS) is fully render-state-aware. Live state is plumbed through paint and reduce-motion gates:

Trust and proof

7 pages

The project

3 pages