autoviv

new chats get their own folder, without operator intervention · ← concepts

Autoviv is the pattern by which a tier-1 agent registers a child folder the first time a new chat (a Slack channel, a Discord guild, a Telegram group) talks to it. No daemon, no env var, no magic — just a catch-all route and one MCP tool call.

the recipe

Three primitives, composed:

  1. Catch-all routes to a tier-1 agent. Two rows at low priority send every message from a platform into one folder, the tier-1 “world” agent (call it atlas):
    seq  match                                          target
    100  chat_jid=slack:*/channel/* verb=mention        atlas
    200  chat_jid=slack:*/channel/*                     atlas#observe
    The #observe row stores every channel message so the agent has context. The mention row fires a turn when someone calls @atlas.
  2. The tier-1 agent notices an unrouted channel. When atlas runs a turn, it sees the inbound message’s chat_jid. If no specific child folder is wired to that JID and the sender holds operator grant, it calls the MCP tool register_group with the JID and a sanitized folder name.
  3. register_group does the rest. ipc/ipc.go:1309gateway.registerGroupIPC writes the group row, seeds the folder with skills and settings (SetupGroup), and inserts a high-priority route room=<jid-room> → <folder> in one step. The next message in that channel lands in atlas/eng-support instead of atlas.

worked example

A teammate invites the bot to a new Slack channel #eng-support with JID slack:T1234/channel/C5678 and posts “@atlas can you help here?”

why no special env var or daemon

Autoviv is not a feature; it is the absence of a feature. The pieces already exist: glob route matching, the register_group MCP tool, group seeding via SetupGroup, the operator grant. An operator who wants per-channel folders writes a catch-all route and a paragraph in the tier-1 agent’s CLAUDE.md. An operator who prefers to register each channel by hand omits both. Same code path either way.

what your tier-1 agent needs to know

Paste a paragraph like this into the tier-1 agent’s CLAUDE.md or PERSONA.md:

When you receive a message from a Slack channel JID
(slack:*/channel/*) that does not yet have its own folder,
and the sender holds operator grant, call register_group
with folder="atlas/<short-name-derived-from-channel>" and
jid="<the channel JID>". Sanitize the channel name:
lowercase, replace spaces and punctuation with '-'.
Reply once in the new folder confirming the channel
is now registered. Do not register channels for non-operator
senders — ask the operator instead.

Tune it: auto-register channels matching a pattern, ask the operator first, only register on explicit request. The agent is making the policy decision; the platform just runs the call.

web slots

Groups at tier 2 and below get two writable web slots bind-mounted into the container: ~/public_html/ and ~/private_html/ (Apache mod_userdir convention). The agent writes a file into ~/public_html/ and vited serves it at /pub/<folder>/ — one path segment per folder, no per-group subdomain. ~/private_html/ serves at /priv/<folder>/ behind an OAuth/JWT gate. An autoviv’d child atlas/eng-support serves at /pub/atlas/eng-support/; it shares the instance hostname with every other folder.

limits

go deeper

Route tables, glob matching, and #observe mode: routing. Operator grant and tier rules: grants reference. Full register_group signature and other MCP tools: mcp reference.