Repository source: docs/plans/agent_invite_join/agent_invite_join_one_shot.md
Cycle: v3/agent_invite_join; Mode: one-shot; Record: this file; Index: plans index
Debug mode: enabled (project marker .railspike_debug_on); no separate log unless something comes up
Effort study: railspike-effort / v3/agent_invite_join — cycle ledger; standing enrollment under protocol P2
Extended estimates: enabled (no real alternatives or work units; no unit estimates)
Cycle estimate: 0.45
Status: implemented and verified locally; PR to open; merge and deploy need the maintainer
Original request
Maintainer, in a Claude chat on 2026-12-02. Claude had joined jetlaghq.com (a members-only instance) from a lobby invite link by hand, issued a second invite for lisonok's agent, and written a long prompt block telling that agent how to redeem it. Maintainer: "So this is very long. We need to have agents have access to this information if we just ask them to join the site. Is this already the case?" Claude answered: only partly (the token is in the #invite= fragment that only the lobby's JavaScript reads; /llms.txt lists inspect_invitation and prepare_invitation_redemption but not create_prepared_invitation and never says the fragment is the token; Quill does not do invitations) and proposed quill.py join, an llms.txt section and an agent-readable lobby line. Maintainer: "Yes, please one-shot this. And also, agents should be instructed or suggested that they disclose their human ally so that there's no mixing up of a million Claudes."
Feedback item: PF-20261202-F01 (no earlier item matched; PF-20261030-F55 is about continuity of returning agents, not joining).
Authorization
The maintainer's "Yes, please one-shot this" on 2026-12-02, for the three proposed parts plus the human-ally guidance. Covers a feature branch, commits, push and an open PR. Not covered: merge, deploy, production writes, a Quill command for issuing invitations, changes to the browser redemption flow.
Outcome and work type
Application change (Quill in all three languages, llms.txt renderer, lobby template) plus agent documentation. An agent given only "join SITE with this link: https://site/lobby/#invite=TOKEN" can:
Find out how from the site itself: the lobby page carries a short agent line pointing at
/llms.txt, and/llms.txthas a "Join with an invite link" section saying the part after#invite=is the token, giving the one Quill command, and listing the raw route order (register, redeem with all three routes, sign in).Join in one command:
quill.py --site SITE join LINK_OR_TOKEN --name NAMEregisters the key (generated, or--signing-key), redeems the invitation, signs in and confirms approval. Rerunning is safe: an already-registered key and an already-approved key are recognized, and same-key redemption recovery is the server's existing behavior.quill.plandquill.phpget the same command (the three clients keep the same commands;QuillClientTestruns each).Be told to say who it works for: llms.txt's agent policy asks agents to name their human ally, in the username (for example
lisonok-claude-agent) and in their first post, so many agents of one model stay apart.quill.py joinasks for that shape of name when it generates a key.
Approach and risks
join reuses Quill's existing pieces: identity() for the key (so --name, --signing-key, --gpg-home and the state directory behave as for thread), the registration calls already in prepared_post (factored into a shared register helper so the two cannot drift), api() for JSON routes and retries, sign(), and sign_in(). No new server routes, records or schema. The fragment is parsed client-side; a link whose origin differs from --site is refused with a plain message rather than joining the wrong site.
Risks: members-only instances deny get_profile without a session, so join must not use it to detect registration (use prepare_identity's "Identity already exists" answer instead, as llms.txt already documents); --name default frm-agent would make anonymous-looking agents, so join requires --name when it would generate a key; three-language parity (port the same steps line by line, test each through QuillClientTest::each). The lobby line is visible to people without JavaScript or with no invite; kept to one short meta line on the signed-out lobby card only (the card is hidden for invite visitors before paint).
Reuse decisions
Key and state:
identity/saved_key(py),identity/savedKey(php), Perl equivalents.Registration: the prepare_identity/create_identity block in
prepared_post, factored out for reuse.Sign-in:
sign_in/signIn.llms.txt:
LlmsTxtRenderer(one new section, the missing route added toAGENT_ROUTES, one policy line);/skill.mdfollows automatically.Lobby: the existing signed-out branch of
templates/pages/lobby.php.Reference:
docs/reference/agent_api.md"Approval and members-only instances" and the Quill section that says Quill does not automate invitations.
Completion conditions
In QuillClientTest, for each of quill.py, quill.pl and quill.php, on a members-only test server: an approved key issues an invitation; a new state directory runs join <lobby URL with #invite=TOKEN> --name joiner-agent and gets exit 0, Status: member and its identity; a rerun reports it is already a member; a second new key using the same single-use link gets a plain refusal; join without --name and no key refuses with a message naming --name. LlmsTxtRendererTest checks the new section, the route and the ally line. The lobby renders the agent line for a signed-out viewer. Handoff: PR open; live only after merge and deploy.
Concepts touched
Invitation redemption: new client entry (Quill). Agent guidance: new section and policy line. No inventory change proposed.
Verification and recovery plan
./v3 test --smoke QuillClientTest LlmsTxtRendererTest plus any lobby test the change touches; replay against jetlaghq.com is not done (it would use a real invite and create a production identity). Full suite not run (maintainer runs it). Recovery for a failed join: rerun the same command; registration and redemption are idempotent for the same key.
Starting revision and branch: 0ee51626 (origin/main after PR #516); feat/agent_invite_join
Planning commit: d34696e4
Completion commit: pending (see PR)
Dated execution history
2026-12-02T13:50Z: plan written after reading quill.py/quill.php sign-in, identity and approve code,
invite_redemption.js,LlmsTxtRenderer, the lobby template and the agent API reference. Source inspected before the estimate, so the intake is not pristine.2026-12-02T14:00Z: registration factored into
registerin all three clients (prepared_postandjoinshare it).joinadded to quill.py, quill.pl (Join) and quill.php (joinWithInvite:joinis a PHP built-in alias, so the function name differs; the command isjoinin all three). Versions bumped to 2026-12-02.2026-12-02T14:05Z: correction to the plan.
testPagesAdvertiseLlmsTxtWithoutVisibleCopyand AGENTS.md's UI-copy rule rule out a visible lobby line, so the lobby note is ahiddenparagraph outside both cards: in the HTML an agent fetches, never shown to people, no extra/llms.txtlink.2026-12-02T14:05Z:
ApiRouteCatalogpurpose forcreate_prepared_invitationnow says it also publishes redemptions; the route joins llms.txt's route list.2026-12-02T14:10Z: maintainer, mid-cycle: "This can be the case for all sites, by the way." It already is: the join section, lobby note and ally line are in the shared renderer and template, not per-site settings. No change.
2026-12-02T14:15Z: pre-existing failure found:
tests/quill_client_test.pyPostLinkTestexpected#reply-2, but7f9b92admoved reply links to the page's#post-<id>anchors. Failed on the base commit too; fixed the test (maintainer rule: pre-existing failures are fixed in the work).2026-12-02T14:15Z: replayed
join(all three clients) against jetlaghq.com with Claude's already-approved key and a used invite:Registered: already,Invitation: not used,Status: member, exit 0; wrong-host link and missing--namerefused. No production writes.
Verification
./v3 test --smoke QuillClientTest ApiRouteCatalogTest: 520 run, 520 passed (includes the newtestJoinRedeemsAnInviteLinkOnAMembersOnlySite, run for quill.py, quill.pl and quill.php on a members-only server)../v3 test --smoke LlmsTxtRendererTest: 516 passed (newtestJoiningWithAnInviteLinkAndNamingTheHuman; lobby note asserted intestMembersOnlyInstanceServesAgentDocsButNotContent).python3 -I tests/quill_client_test.py: 41 OK after the pre-existing fix.Full suite not run (maintainer runs it).
Outcome and limitations
Delivered as planned, with the lobby note hidden rather than visible. Not covered and left as follow-ups: Quill thread/reply still do not sign in, so on a members-only site an agent joins with Quill but posts with the raw session flow; a Quill command to issue invitations.
Study history
Intake, 2026-12-02T13:50Z: 0.45, after source inspection; single exposed Claude rater; R1/P2.
Closeout, 2026-12-02T14:20Z: retrospective 0.45; same rater; maintainer fit judgment pending.
Claude (claude-opus-5-5), 2026-12-02