Bounded Terminal
Bounded terminal primitives for AI coding agents. A small toolkit reducing accidental context expansion in shell-driven coding workflows by wrapping risky terminal operations with clear bounds and receipts.
Role
Design and implementation of bounded command output, code context extraction, file-effect observation, and pipe data-flow inspection primitives.
Stack
Links
Tools
| Tool | Primitive | Purpose |
|---|---|---|
cap | Bounded command output | Wraps commands that may produce large or noisy output |
span | Bounded code context | Extracts containing blocks from a known line, pattern, or symbol |
fx | File-effect observation | Observes file mutations (create, modify, delete) |
tap | Pipe data-flow observation | Provides stream stats and samples without changing stdout |
Planned: tx — a rollbackable mutation boundary backed by Git.
Thesis
AI coding agents waste context because terminal work is often unbounded, over-broad, and hard to observe. Bounded Terminal reduces accidental verbosity, accidental scope expansion, and accidental state ambiguity.
Agent Integration
Agents using these tools follow a simple rule set: use cap for uncertain commands, span instead of reading whole files, fx around file-mutating operations, and tap for pipeline inspection. JSON/receipt modes enable structured downstream consumption by other tools or agents.