Skip to content

feat: step 03 becomes human in the loop, custom server moves to extras - #6

Merged
Statyk7 merged 3 commits into
mainfrom
hitl-step
Oct 29, 2026
Merged

Statyk7 merged 3 commits into
mainfrom
hitl-step

Conversation

@Statyk7

@Statyk7 Statyk7 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Step 03 of the workshop becomes human in the loop: the agent asks you a question with buttons in the chat, and its run waits for your answer.

What changes

  • New step 03-human-in-the-loop. A generic askUser tool registered with CopilotHumanInTheLoop: the agent asks one question with two to four options, the run waits, and the option you tap goes back as the tool result. The card is an AppDecisionCard in the chat. The tone check uses it: ask for a calaverita without a tone and the agent asks "How should I roast Mario?" with Playful, Sarcastic and Dramatic.
  • Runtime prompt (runtime/server.ts): when to use askUser, the tone check, and showCalaverita only when the user asks for a calaverita, not as soon as the form is complete. Steps 01 and 02 have no askUser tool, so they don't change.
  • tool/setup.mjs: step 03 uses the same backends as 01 and 02 (shared, local or custom) and no longer starts its own server.
  • The custom server moves to extras/custom-server, unchanged. It's no longer a workshop step; the README's "Keep building" section points to it.

How to try it

node tool/setup.mjs --step 03

Type "Write a calaverita for Mario, a chef": the form fills in, a Question card appears, and once you tap a tone the agent writes the calaverita. Name a tone in the message and it doesn't ask.

Checks

  • 03-human-in-the-loop: dart analyze --fatal-infos finds no issues, and the app and assistant tests pass (12).
  • runtime: the gate tests pass (6).

🤖 Generated with Claude Code

https://claude.ai/code/session_015qwFeXxEAoB3sM6cdC3K4W

Statyk7 and others added 3 commits October 28, 2026 18:48
A generic askUser tool registered with CopilotHumanInTheLoop: the agent asks
a question with two to four options, its run waits, and the option the person
taps goes back as the tool result. The card is an AppDecisionCard in the chat.
The tone check uses it: asked for a calaverita without a tone, the agent asks
how to roast and then sets the tone in the shared state. While a question waits
nothing shows as working and the message box points to the card. The runtime
prompt says when to ask. setup.mjs and the README point step 03 here.

Built on the branch of PR 1, which it needs for the password header, so it
should merge after it. 03-custom-server is left as it is for now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qwFeXxEAoB3sM6cdC3K4W
Asked only to fill in the form, the agent also wrote and showed a calaverita.
The prompt now says to call the tool only when the user asks for one in the
conversation, and that a filled form or a dressed skull is not such a request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qwFeXxEAoB3sM6cdC3K4W
Step 03 is now human in the loop, so the custom server is no longer a
workshop step. It moves unchanged to extras/custom-server, and the README
points to its new place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qwFeXxEAoB3sM6cdC3K4W
@Statyk7
Statyk7 merged commit 54d7618 into main Oct 29, 2026
1 check passed
@Statyk7
Statyk7 deleted the hitl-step branch October 29, 2026 15:23
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