Feature plan: Step 1 · Step 2 · Step 3 · Step 4

Cycle: v3/connect_agent; Mode: staged; Debug mode: enabled (log) Effort study: railspike-effort / v3/connect_agent, protocol P2, reference R1; ledger Extended estimates: enabled Approved Step 1: Option A, split (commit 83db3d22)

Cycle estimate: 0.50 (this cycle; quill_member_posting separate)

Problem

Handing a site to your agent takes a long hand-written prompt, and on a members-only site the member also has to make an invite elsewhere and paste it in. The page meant for this (/agent/start/) offers three prompts and no invite.

Scope and dependencies

This cycle is the page, the button and the prompt. It depends on PR #518 (quill.py join, the llms.txt join section). The prompt promises the agent can post after joining, which needs the separate cycle quill_member_posting (Quill signs in for writes on members-only sites). This cycle ships after both. Feedback: PF-20261129-F12, parts (c), (d), (e) and the "Run your own site" expando; its other parts stay on the item.

User stories

  • As a member of a members-only site, I want one click to get a prompt with an invite already in it, so I can paste it into my agent and be done.

  • As a visitor to an open site, I want one prompt I can read in a few seconds, so I know what my agent will do before I paste it.

  • As a member, I want the agent to say it works for me, so people can tell my Claude from everyone else's.

  • As an agent, I want the prompt to name the exact username shape, the guide and the invite, so I can join and post without asking.

Core requirements

  • /agent/start/ is titled "Connect your agent" and shows one prompt first. "Get introduced" and "Run your own site" stay available under one closed "Other prompts" expand.

  • The prompt is short and plain: read /llms.txt, join (with the invite when there is one), keep the key, use a username that names the human, post a short intro saying who you work for. The intro is in the main prompt (default for Step 1's open question).

  • On a members-only site, an approved member sees "Make an invite for my agent". One click creates one single-use invite, expiring in 7 days (default for Step 1's open question), signed with the member's browser key through the existing invite flow. The page then fills the invite link and the suggested username <member>-<model>-agent into the prompt. Nothing is created until the click.

  • Visitors who aren't approved members see the same prompt with "ask a member for an invite link" in place of the link. Open sites show the prompt with no invite part and the visitor's own choice of human name.

  • Which version shows is decided before paint from the browser's member state; server HTML stays the same for everyone.

Delivery scope

Work type: application change (start page template and prompt text, a small script reusing invite issuance, copy rules). No new routes, records or schema; no change to /agent/ (library), the Invite page or llms.txt beyond what PR #518 adds.

Completion boundary

Normal entry: the existing "Use with your agent" links (About, visitor intro, getting started), renamed to "Connect your agent". End to end: a member clicks once, copies, pastes into an agent; the agent joins with quill.py join and posts its intro under a name that includes the member's. Recovery: a failed or uncertain invite shows the short message with Details and a retry that checks the same invite before making another (the Invite page's existing behavior). Release: after PR #518 and quill_member_posting are merged, then deploy.

Risks

  • Uncertain invite creation could make two invites. Earliest validation: reuse the Invite page's uncertain-outcome check unchanged. Mitigation: no new issuance code.

  • Member state is browser-side; a member whose key was wiped sees the visitor version. Mitigation: that version still works ("ask a member"), and Account recovery is unchanged.

  • The prompt drifts from llms.txt. Mitigation: the prompt points at /llms.txt for every step it can and names only the join command and the username rule.

  • Copy: the page must stay final on first paint and not grow explanatory text (AGENTS.md UI copy). Mitigation: one button, one prompt, one expand.

Shared component inventory

  • Page and prompts: templates/pages/agent_start.php, ProfilePresentationContent::AGENT_PROMPTS/agentPrompts(), AgentPageController::renderStart(): extend, keeping per-profile prompts.

  • Prompt box and Copy: templates/partials/agent_prompt.php, partials/agent_prompt_script.php: reuse unchanged.

  • Invite creation: public/assets/invite_issuance.js (signing, uncertain-outcome check): reuse; factor out the issue call if it is not already callable from another page. No second implementation.

  • Member state before paint: the forum_pki_* checks used by the head script and member_approval.js: reuse.

  • Expand: the site's existing <details> pattern (as About's agent prompt used).

User flow

  1. A member opens "Connect your agent" from About or the getting-started links.

  2. They click "Make an invite for my agent".

  3. The prompt now holds the invite link and ilyag-<model>-agent; they press Copy.

  4. They paste it into their agent, which reads /llms.txt, runs quill.py join, and posts a short intro naming the member.

Success criteria

  • On a members-only test site, one click and one copy give a prompt with which a fresh agent workspace joins and posts its intro, with no other input.

  • The intro post's author username includes the inviting member's name.

  • Visitor, open-site and member versions each render correctly on first paint (no swap after load) in the default theme and one other.

  • Loading the page creates no invite; each click creates exactly one, including after a retried uncertain response.

Concepts touched

Agent prompt (changed: one main prompt, site-mode variants). Invitation (new entry point; same records). No inventory change proposed.

Enhancement requests

  • Prefilled chat links (claude.ai/new?q=), screenshot, "why use this", looks: stay on PF-20261129-F12, not in this cycle.

Claude (claude-opus-5-5), 2026-12-02