Skip to content

A new session asks about onboarding, then the brief, as one-key questions in its root window, answered from the command line or the window while nothing is typed; the librarian starts only once onboarding is answered

TUI decision 154 · accepted · 2026-10-10 · issue #516

Root Decision 835, issue #516's third wave. Amends 127 and 131 only in when the librarian starts: after onboarding is answered, and an outdated brief asked first; their rules (the daemon's refresh_due, saying why none starts) are unchanged and moved with the code into Troupe.Client.Daemon.Start.

  • The questions. At a new session's start (create_session, unless the caller passes refresh_brief: false, as a headless run does), in a git repository, the client asks the daemon onboard.plan. Onboarding first: "Onboard 5 files from Claude Code and Cursor into Troupe's own? [Y/n/r]", the files listed above it, one a line, with what was skipped. y (or Enter) writes every ordinary file (onboard.apply with all), then asks for each new AGENTS.md on its own, in troupe onboard's words, [y/N]; r shows each file as troupe onboard shows it (its heading, notes and diff, Troupe.CLI.Onboard's describe/1, the diff coloured as an edit's) and asks for it, [y/N]; n says no to all of them (onboard.decline with all), remembered for this version. outdated: "Onboarding rules changed since this repository was onboarded (v1 to v2). Re-run now? [Y/n]", Yes writing as y does. Then, and only then, the brief: an outdated one is "The librarian's survey changed (v1 to v2): rewrite the brief now? [Y/n]" (n is memory.decline), and otherwise the librarian starts as 127 and 131 have it. Each answer says what it did as a line (onboarded .troupe/rules/style.md, left out 2 files; …).
  • A question box like an approval's, not the setup's screen. The question is the client's own :local_question event in the root window's journal, written by the session's worker once the session's first event has opened the window (Troupe.Remote.Worker.post/3, note/2's way, so a rebuilt screen has a window to draw it in), and its answer a :local_question_answered: a screen rebuilt from the journal draws exactly what is still asked, and a question left open when the person quit is still there, and answerable, when the session is opened again. The model holds it as a pending item of kind :local, so the window says it needs you as it does for an approval, and draws it in the pane and at the foot of its tile, since a new session's screen is the command line over the tile. Not the setup's full screen (TUI Decision 153): that runs before any session, and these questions belong to one, between its first event and the person's first line. Not ask_user's question: that is the model's, answered over the protocol, and a typed y there is an answer, where here it would be a first message to the agent.
  • One key, from where the person is. While nothing is typed, the question's keys answer it, and Enter is its default (the capital in [Y/n/r]), from the command line (where a new session opens) as from its window; with anything typed, keys are text, as always. While one is asked the status line says what Enter does ("Enter answers the start's question: yes (or y / n / r)") rather than "press 1 (or Enter, …) to answer", which would send the person to a window Enter no longer opens. Troupe.Client.answer_local/3 takes the answer and does what follows before it returns: the write, the no, the next question, the librarian. Each question's data carries what the next step needs (the plan's items with their ids, the brief's due), so the client keeps no state but the journal. A pod's session asks nothing (Troupe.Client.Remote refuses an answer).
  • Order and gating. The librarian waits for the last onboarding answer, so it reads the AGENTS.md onboarding wrote. Onboarding is asked in a git repository only, as the librarian starts in one only (105): troupe opened in a home directory asks nothing. The brief's question follows 127's gates (memory on, memory_auto_refresh, a repository, a model to ask). A daemon from before onboard.plan starts the librarian as

Governs: clients/tui/lib/troupe/client/daemon/start.ex, clients/tui/lib/troupe/client/daemon.ex, clients/tui/lib/troupe/client.ex, clients/tui/lib/troupe/remote/worker.ex, clients/tui/lib/troupe/ui/tui/model.ex, clients/tui/lib/troupe/ui/tui/server.ex, clients/tui/lib/troupe/ui/tui/view.ex, clients/tui/lib/troupe/cli/onboard.ex