Superego

Start here

Superego runs agents. A daemon on each machine keeps them running while the app is closed; the app (desktop, browser or phone) and the superego command are its clients. A profile says what an agent is (model, prompt, tools, UI): files in ~/.superego/profiles/<name>/ or a project's .superego/profiles/<name>/.

machine   a daemon (this computer, or one reached over ssh)
└─ project  a git repository (and its worktrees) or a folder, on that machine
   └─ thread  one conversation with an agent, in the folder or a worktree of its own
      └─ pane   a view beside the thread: a diff, a file, a web page, a profile's own

Everything the app does is an action with an id (thread.start, pane.open, vault.graph), run alike by the command line, the window, keys and extensions. superego actions lists a machine's.

Quick reference

superego                          # start a thread here and open it in the app
superego start . -p "fix tests"   # start one without the app; prints its id
superego send <thread> "and the docs" && superego read <thread> --wait   # its answer, once it stops working
superego threads --json           # every thread, with its status
superego do thread.rename --thread <thread> --title "Fix the tests"
superego profile new [name]       # .superego/profiles/<name>/profile.ts, with types for an editor
superego daemon restart           # onto the installed code

Start an extension with extension new

Scaffold one in the shape of the job and change it; don't start from a blank file.

superego extension new orders           # an agent tool, in this project's default profile (made if there's none)
superego extension new orders --ui      # a pane, UI half only (ui.tsx)
superego extension new orders --badge   # a sidebar mark: a daemon half sets a thread's fact, a UI half draws it
superego extension new orders --tool --ui   # an agent tool, and a pane of what it did
superego extension new orders --user    # in your own profile (~/.superego/profiles/default), for every folder
superego extension test orders          # check its types and run its tests
superego extension reload               # load the profile's changes now, and say why if it doesn't load
superego extensions                     # every extension here: where it's from, how it stands, what it registered

new writes <profile>/orders/: the smallest working extension of that shape, with version, api, a passing test on superego/testing and a README, and gives the profile its types.

No Node needed. superego extension test is the type checker and test runner. Don't look for node, npx, tsc or bun: plain Node can't import superego.

Then:

Topics

Read only what the task needs: superego --skill <topic>, or <topic>.md beside this file.

Topic For
guide building an extension: the big picture, one end to end, the build-queue examples (examples/), testing
cheatsheet what either half can register, a line each
tools giving an agent tools and prompt sections (testing a tool)
daemon a daemon half: actions, methods, live values, shortcuts, blocked status, reaching threads, watching tool calls
ui a UI half: panes, slots (a sidebar mark), tool rows, reading threads (a board)
window placing views, spaces, data-only views (blocks, no UI code), links, window events
lifecycle teardown, a thread's hooks (starting, archived, …), versions
profiles profile.ts: model, prompt, extensions, panes, allowing, extends, when changes apply
thread-tools handing work to other threads; a lead profile
cli the command: threads, actions, superego mcp for outside agents, machines, settings, the daemon
bundled working on Superego itself: a bundled extension in extensions/
debugging something doesn't load, run or show

A profile with a tool needs profiles and tools; one with a pane, profiles, daemon and ui.

Ground rules

packages/cli/skill/SKILL.md