Skip to content

feat: Settings shows the attendant routine's setup and prompt - #124

Draft
fiddur wants to merge 5 commits into
developfrom
routine-setup-in-settings
Draft

fiddur wants to merge 5 commits into
developfrom
routine-setup-in-settings

Conversation

@fiddur

@fiddur fiddur commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Settings → Call an agent gets collapsible setup steps and the routine prompt (with a Copy button). The prompt lives in the repo, filled with this server's URLs, a test keeps it in step with the fired payload, and it ends the payload-less first turn without notifying.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bwp5QefjsjMFeq6CK6cT6w

…ompt to copy

The prompt ships with the server, filled with this server's URLs, and ends a
turn quietly when the payload has not arrived yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bwp5QefjsjMFeq6CK6cT6w
@fiddur
fiddur requested a balanced review from Copilot November 6, 2026 08:18

@diffity diffity Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. Checked that the prompt placeholders resolve to the mounted /mcp and /live/await routes, that build.ts ships the prompt into dist, that the Settings CSP allows only same-origin scripts, and that the drift test compares the prompt's payload line with an actual fire.

— diffity review, requested by @fiddur

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Patch sessions are directed to fetch an unpushed tree from origin despite lacking access to fallback retrieval tools, leaving routine calls without a working retrieval path or a clear rejection.

1 open issue
What changed in this PR

Adds routine setup guidance and a copyable, server-specific attendant prompt to Settings → Call an agent.

Changes:

  • Adds collapsible setup instructions and a Copy button for the routine prompt.
  • Stores the prompt in the repository, substitutes server URLs, and includes it in the server build.
  • Adds tests for Settings rendering, script delivery, and consistency between the prompt and fired payload.
File Description
packages/​server/​tests/​routine.test.ts Checks payload field alignment and prompt URL substitution.
packages/​server/​tests/​http.test.ts Tests setup content, copy script delivery, and script security policy.
packages/​server/​src/​routine.ts Loads and fills the routine prompt template.
packages/​server/​src/​routine-prompt.md Defines attendant behavior, including ending payload-less turns silently.
packages/​server/​src/​html.ts Adds clipboard handling and wrapped prompt styling.
packages/​server/​src/​app.ts Displays setup guidance and the prompt; serves the Settings script.
packages/​server/​build.ts Copies the routine prompt into the server build.

Review effort: Balanced

Comment thread packages/server/src/routine-prompt.md Resolved
…ch its head

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bwp5QefjsjMFeq6CK6cT6w

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The raw HTTP helper instructions omit required tour-tool arguments and request steps for deleted files that tour_step rejects.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Low severity Tour instructions omit required arguments and reference deleted files

packages/​server/​src/​routine-prompt.md:59

The raw HTTP helper does not retrieve tool schemas, yet this instruction omits the required tour argument for tour_step and tour_done, and the nonempty body for tour_step. It also requests steps for deleted files, which tour_step rejects because it reads files at the session head (mcp.ts:518–555). Include complete call shapes, restrict steps to files present at the head, and describe deletions in the tour body.

Review effort: Balanced

…s deleted files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bwp5QefjsjMFeq6CK6cT6w

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because an unpublished review finding raises a concern about whether the comment-tool example guides reviewers to anchor removed-code findings to the correct diff side.

1 open issue

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because commands may use the wrong checkout in multi-repository setups, causing fetch failures and leaving reviews or questions unhandled.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the routine setup guidance and patch-session safeguards.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants