Clubs
Tutorial

Exercises

Short tasks that show how the pieces fit. Try each one before opening the answer.

1. Where does a club card's Next line come from?

Show the answer

From the assistant's knowledge entry next-meeting: its one-line summary on the card, its full value on the club page. ops/clubs-site/publish.mjs reads every top-level entry with GET /api/projects/<slug>/kb and clubs.json says which entries each page shows.

2. Why can a member not change the date, even by asking cleverly?

Show the answer

Saving needs propose_changes and apply_changes, which the engine gives only to staff (an admin of the assistant). And apply_changes refuses a change proposed in the same reply, so even the organiser has to see it and say yes first.

3. Change a skill and see it work.

Show the answer

Edit a file in docs/chatbot-engine-documentation/Club organiser assistants/bots/book-club/skills/, for example add a "save the date" message to invite-people.md. Push with python3 push_club_assistant.py bots/book-club --quiet-forms, wait two minutes (the engine caches the assistant), then ask for invitations as the organiser.

4. How does the assistant know it is talking to the organiser?

Show the answer

Each club has staff-prompt.md, saved as the assistant's staff prompt. The engine adds it under "Working with staff" only on turns from a signed-in admin; the member prompt says that without that section the person is a member.

5. When does the website redeploy?

Show the answer

launchd runs node ops/clubs-site/publish.mjs every 10 minutes. It builds every page and deploys only when the pages' digest differs from state/last.json. --build builds without deploying; --force deploys anyway.

6. Read who signed up without the chat.

Show the answer

The organiser's assistant links to the dashboard page for each form. Over the API: GET /api/projects/<slug>/forms/join-the-club/responses or /responses.csv, as an admin.