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

Cycle: v3/agent_setup; Mode: staged; Debug mode: enabled (log) Effort study: railspike-effort / v3/agent_setup, protocol P2, reference R1; ledger Extended estimates: enabled Approved Step 2: commit 66385752

Cycle estimate: 0.45 (revised 2026-12-02 from 0.40 before approval: agent access gating folded into Stage 1)

Completion Contract

  • Normal entry: the Connect your agent prompt (/agent/start/), which names /agent/setup.txt.

  • End to end: an agent that can run commands reads the guide, tests what it can do, joins with the invite, sends its human one message with three defaulted choices, posts a hello naming the human, and (if it can schedule and the sweep is on) schedules a daily sweep. A fetch-only agent reports what's new on an open site, or says it can't join a members-only site.

  • Recovery: rereading the guide is always safe; it writes nothing on the server beyond join and the hello, both already safe to repeat or skip.

  • Verification outside tests: a fresh agent session follows the guide on a local test site; recorded in Step 4.

  • Release: merge and deploy.

Key Risks

  • High risk: the guide is the product; if a fresh agent can't follow it, the feature fails even with green tests. Validation: Stage 3 has a fresh session follow it cold, and the guide is revised from what that run shows.

  • Guide length creep. Validation: a word-budget test (600 words) and a three-choice test in Stage 1.

Stage 1

Estimate: 0.20 (revised 2026-12-02 from 0.15: agent access gating added before approval, see below)

  • Goal: /agent/setup.txt exists on every site with agent access on, versioned, short, and reachable without signing in; one setting decides agent access.

  • Agent access (maintainer, 2026-12-02, before Step 3 approval: "please fold it into step 3, leave it out of qdb for now"): the Agents page currently needs both the FORUM_AGENT_PROMPT_ENABLED flag (default on, operator-settable) and agent prompts in the site's profile, which only plain, ZenMemes and JetLAG have, by history rather than choice. The Boston (chouse) and MIT Rap Club profiles get the shared prompts, so the flag alone decides there; QDB stays without for now. /agent/setup.txt follows the same rule as the Agents page (TemplateRenderer::agentPageEnabled()): 404 where it is off, and /llms.txt mentions the guide only where it is on. /llms.txt itself stays on everywhere. The flag's description is updated to say this.

  • Dependencies: none.

  • Expected changes: 'agentPrompts' => self::AGENT_PROMPTS on the boston and mitrapclub profiles; a renderSetupGuide() beside render() and renderSkill() in LlmsTxtRenderer (site name and origin filled in; links to /llms.txt sections instead of repeating them); route next to /llms.txt and /skill.md in Application, plus the members-only allow-list entries; one pointer line in /llms.txt. Guide content: Setup-Version: 1 and change notes, the ability test, three short paths, the one message of choices with defaults, sweep limits, keeping the choices and version, rechecking the version at each sweep.

  • Verification approach: LlmsTxtRendererTest (version line, under 600 words, exactly three choices each with a default, sweep limits present, links resolve to real /llms.txt sections); route test on an open site and on a members-only site signed out, 404 with the flag off and on QDB; PresentationProfileMatrixTest gating matrix (boston and mitrapclub now show the Agents page; QDB doesn't); tests/browser/tools_launcher.mjs for chouse, which currently expects no Agent Prompts tool.

  • Estimate details: driver: the guide's wording; uncertainty: how much an agent needs spelled out.

  • Risks or open questions: see Key Risks.

  • Canonical components/API contracts touched: src/ForumRewrite/Http/LlmsTxtRenderer.php, Application routes and members-only allow-list (/llms.txt, /skill.md handling), TemplateRenderer::agentPageEnabled() (reused as the one check), ProfilePresentationContent profiles, FeatureFlagRegistry description of FORUM_AGENT_PROMPT_ENABLED.

Stage 2

Estimate: 0.10

  • Goal: the Connect your agent prompts point at the guide.

  • Dependencies: Stage 1.

  • Expected changes: ProfilePresentationContent::CONNECT_PROMPTS (open, visitor, member) become one line each naming /agent/setup.txt; the member prompt keeps {invite} and {human} for connect_agent.js.

  • Verification approach: PresentationProfileMatrixTest page and members-only prompt tests; tests/browser/connect_agent_invite.cjs (fill-ins unchanged); QuillClientTest::testJoinRedeemsAnInviteLinkOnAMembersOnlySite (reads the invite and name from the member prompt).

  • Estimate details: driver: keeping the acceptance test's prompt parsing; uncertainty: small.

  • Risks or open questions: none beyond Stage 1.

  • Canonical components/API contracts touched: ProfilePresentationContent, templates/pages/agent_start.php (unchanged), public/assets/connect_agent.js (unchanged).

Stage 3

Estimate: 0.15

  • Goal: a fresh agent follows the guide cold and ends set up.

  • Dependencies: Stages 1 and 2.

  • Expected changes: a local members-only test site with an invite; a fresh Claude session given only the filled member prompt; the guide revised for anything that session stumbled on; result recorded in Step 4.

  • Verification approach: the run ends joined, with one choices message, a hello post naming the human, and (simulated) a scheduled sweep; plus the focused tests above. Full suite not run.

  • Estimate details: driver: guide revisions; uncertainty: how many rounds.

  • Risks or open questions: a single agent run is anecdotal; other agents (ChatGPT, Codex) are not tried in this cycle.

  • Canonical components/API contracts touched: the guide only.

Concepts touched

Agent prompt (changed); setup guide (new route). Inventory: none.

Claude (claude-opus-5-5) · 2026-12-02 UTC