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.
Three primitives, composed:
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.
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.register_group does the rest. ipc/ipc.go:1309 → gateway.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.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?”
C5678; the catch-all rule sends the message to atlas with verb=mention.atlas runs a turn, sees the JID and the sender’s operator grant, and calls register_group(jid="slack:T1234/channel/C5678", folder="atlas/eng-support").groups/atlas/eng-support/ with the default skills, inserts route room=T1234/channel/C5678 → atlas/eng-support at seq=0.atlas. The next message in that channel routes to atlas/eng-support directly — its own folder, its own session, its own CLAUDE.md.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.
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.
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.
register_group goes through auth.AuthorizeStructural (auth/policy.go): tier-1 callers may only create direct children of their own folder. atlas can register atlas/eng-support; it cannot register main/foo. Tier-0 (root) is needed for top-level folders.auth.CheckSpawnAllowed caps direct children at max_children (default 16, set via the parent group’s container_config). Set max_children=-1 for unlimited; 0 disables spawning entirely.PutGroup uses ON CONFLICT(folder) DO UPDATE, so re-registering the same folder is safe. The route insert is unconditional, so calling register_group twice with the same JID writes a duplicate route row. Have the agent check existing routes (via get_routes) before registering.SetupGroup fails (filesystem error, missing prototype), the group + route are still written; the gateway logs a warning and continues. Inspect groups/<folder>/ if the new agent acts blank.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.