Bram in Brief
I’ve been using and enjoying Jon Udell’s Bram (which stands for “Bram Runs Agents Mindfully”). Here’s a summary of what I’ve learned so far.
Introduction
- A desktop application that wraps the agent CLI you already use
- Started as a way to show people a web app under development
- Terminal and browser side-by-side, ask for things in the terminal and see the result in the browser
- Terminal was horrible UX, so packaged and unified that split-screen experience
- Later added Worklist feature for managing todo items, and it took off
- Design assumptions:
- The bottlenecks in agentic development are comprehension, review, and trust
- Tools should reinforce pre-existing good practices
Terminology
- Model: a gajillion parameters derived from stolen intellectual property
- Prompt: one discrete instruction given to the model
- Agent: a program that mediates between a model and a user
- Translates change requests into invocations of command-line tools, edits files, etc.
- Harness: the program that guides and controls the agent
- Gate: a checkpoint where the harness (and possibly the user) allows an agent to do something or not
- Grant: permission to do something, either indefinitely or for a limited time or purpose
- Item: one proposed change on the Worklist
- A plan with before/after prose and a prediction of the files it will touch
- Turn: one complete cycle of prompt and action or response
- Forge: a repository host such as GitHub, GitLab, or Forgejo
- Signature: the attribution block Bram attaches to an agent-authored forge post
- Not a cryptographic signature, but rather an HTML
<details>expander
- Not a cryptographic signature, but rather an HTML
Gating
- Every change moves through the worklist
- Agent proposes a draft with before/after and a prediction of files that will be modified
- Bram only authorizes edits when the user clicks “Start”
- Committing requires a separate authorization
- The user can discuss, refine, challenge, etc. between proposing and committing
- An edit not covered by an approved item is rejected before it happens
- No relying on the agent’s good will
- Enforcement is two layers that work together:
- “Soft” is prose in Markdown: the conventions the agent reads
- “Hard” is provider-neutral
PreToolUsehook layer, now a separatebram-guardbinary - Soft can graduate to hard once experience proves the need
Authorization
- Design assumes that both users and agents can make mistakes
- Two records sit behind each work item:
- Authorization: a durable grant (e.g., “the user clicked start”) that survives across turns
- Claim: the “something is running right now” marker, which is dropped when the turn ends
- Each grant is a state machine: live → {complete, known failure, uncertain} → ended
- A receipt records how it was authorized (e.g., a click, a phrase, or evidence)
- “Evidence” == Git showing the work landed
Ownership
- Problem: concurrent work (i.e., two subagents editing the same file at once)
- Bram attributes each line of a diff to the item that wrote it
- Doesn’t use
git blame: that works over commits, while this ownership is over uncommitted changes
- Doesn’t use
- Mechanism:
- Each time the set of active items changes, Bram snapshots the whole project tree into a temporary index
- A single Git tree object that doesn’t copy files or touch the real staging area
- Ownership is then a diff of consecutive snapshots
- Each line is credited to whichever item’s edits last produced it
- When the user commits the file, lines that no item owns (e.g., a chat edit made outside any item) ride along
- The commit report lists those lines so that the user can see them rather than have them hidden
- Relies heavily on Git plumbing (temporary indexes, boundary trees, worktrees)
- Reducing this reliance is a standing goal
A Note on Commits
- Commits are whole-file: Bram stages and commits entire files, not individual hunks
- Git does not force this:
git add -plets you stage hunks and commit a partial file - Whole-file is the current design, not a settled principle
- Keeps a file shared between concurrent tasks from being half-committed
- Git does not force this:
- A commit that times out is never blindly retried: the rule is “check
git logfirst”- The commit runs over a loopback HTTP request
- If that request times out or drops, the agent never gets the success response even though Git already wrote the commit
- So a blind retry could double-commit
Provenance
- Agent posts to forge through the user’s account
- So an unattributed agent post can’t be distinguished from a post the user made
- Every agent-authored artifact therefore carries an attribution block (not a cryptographic signature)
- Applies to issue body, comment, PR description, code review
- Bram version, model, subagent, machine, commit, agent CLI
- Displayed as an HTML summary/details block: summary visible, provenance inside
- A guard denies unattributed writes to the forge
- Whoever makes the write attaches the attribution block
- A subagent’s findings carry the orchestrator’s attribution with the subagent credited inline
Provider Agnostic
- Bram supports Claude, Codex, OpenCode, and Antigravity
- We’d like to add more
- A feature built for one is built for all
- Bram branches on the provider only where that provider’s own CLI or file format forces it
- The guard polices the project, not the machine
- An edit anywhere else (e.g., a dotfile in your home dir, or another repo) is allowed
- Bram still records it so there’s a trace note that Bram saw the edit and let it pass
Evidence Before Theory
- No single external signal is authoritative
- PTY output is fast but noisy
- Provider JSONL is structured but delayed
- XMLUI state is what you see
- Bram’s answer is the turn-state spine
- “Turn-state” = state of the turn (working, waiting, finished)
- “Spine” because it’s the backbone every UI surface reads from
- Instead of each surface inferring state on its own
provider,phase,pendingMenu,turnStamp
- The spine is an example of “evidence before theory”
- Built by adding instrumentation and letting noisy signals be arbitrated in one place rather than guessing which was right
- Bram indexes the project’s whole history in SQLite
- Session transcripts, commits with diffs, issues, worklist history, etc.
- Bram queries this before diagnosing a bug, proposing a change, or asserting a fact about the past
- Interprets a miss as “nothing matched” rather than as proof of absence
- Development is log-first
- When something misbehaves, Bram reads what the logs recorded before theorizing about the code
Attention Budget
- Warn only when a nontechnical user can take action and the action is named in plain words
- Never nudge toward commit
- Describe a committable item factually and stop
- “Looks good” is not authorization: Bram only commits on the durable record (the click), not on a polite remark it might have misread
- Bram defines its own terminology when it is first used
- Opens only what needs action
- Decisions vs. focus
- Persisted choices go to local storage
- Where you were (e.g., scroll position or drafts) goes to session storage
Issues
- Issues are not closed at commit time
- The close is queued and only fires once the commit has been pushed
- A rebase changes hashes even when the patch is identical, so a queued close could strand
- Bram re-anchors it with
git patch-id --stablebefore the final check
- Bram re-anchors it with
- Again, closing never pushes: pushing is the user’s responsibility
Reasoning as an Artifact
- Mindfulness is not politeness
- It is a set of enforced invariants that make the agent’s work legible
- Decisions are recorded with the evidence, the rejected alternatives, and a “revisit when” condition
- Tries to prevent a settled choice being re-argued later
- Git is infrastructure, not just a revision store
- Bram keeps its own bookkeeping (e.g., ownership snapshots) as Git objects, so that state lasts as long as the repo does instead of living in a side database
Read Me Next
README.md: the tourdocs/authorization.md: the security modeldocs/git-as-infrastructure.md: the mechanicsdocs/attribution-model.md: line ownership
Categories:
software-engineering