Globetrotter docsversion 0.3.0 · 2026-12-04

Working with an agent (Claude Code)

On this page
  1. 1. Give the project the tools (5 minutes)
  2. 2. Five prompts that work
  3. 3. Rules to give the agent
  4. 4. How a human reviews what an agent did
  5. 5. What it did well and badly in the run

You can do everything in the previous pages by hand. This page is for working beside Claude Code: giving it the project, five prompts that worked, the rules to give it, and how you check what it did. The studio and the agent edit the same two JSON files through the same validated operations, so you can use both on one project.

1. Give the project the tools (5 minutes)

The tools are an MCP server called globetrotter-design (115 tools). It runs npx globetrotter mcp in the project folder.

The plugin needs a public repository; the .mcp.json does not. The plugin (claude plugin marketplace add Yashwanthkikkuri/Designer-, then claude plugin install globetrotter@globetrotter) is in the Globetrotter repository (plugins/globetrotter/), and when this page was written that repository was private, so for anyone without access those commands fail. The zip does not contain the plugin. (Earlier builds of the installer ended by telling you to run them; it now says this instead.) If the owner gives you access, the plugin is the nicer way, because it also installs the m3-design skill, a long guide to the design schema, catalogue and rules. If not, use the second way, which was tested.

A .mcp.json in the project folder (works with no plugin):

{
  "mcpServers": {
    "globetrotter-design": {
      "command": "npx",
      "args": ["--no-install", "globetrotter", "mcp"]
    }
  }
}

--no-install matters: without it, a folder where Globetrotter is not installed would let npx fetch an unrelated npm package of that name. Rally does not ship this file; add it (and decide whether to commit it).

Check it, from the project folder:

claude mcp list
globetrotter-design: npx --no-install globetrotter mcp - ⏸ Pending approval (run `claude` to approve)

Run claude in the project folder once and approve the server when it asks; after that /mcp lists globetrotter-design. A project's CLAUDE.md (the installer wrote one; Rally has one) already tells the agent the loop and the tool names, so without the skill it still knows what to do. Without a running studio the tools still work: they read and write the files.

Tested: a one-shot claude -p … --mcp-config <that file> --strict-mcp-config --allowedTools "mcp__globetrotter-design__*" in a scratch project did the work of prompt 1 below. The interactive approval step itself was not driven.

2. Five prompts that work

Each prompt says which tools to use; an agent given a design task and no hint sometimes reaches for the file. The tool calls are what a good run makes.

1. Start, and make a small change. "Use only the globetrotter-design tools. Start with design_session for the design my-first-app. Then, on the page House rules, add one line of words under its heading: Bring a coat if it is cold. Run lint_design when you are done and tell me in three lines what you changed and anything lint says." Run: the agent made a session read, one add_words, one lint_design, and answered in three lines: what it added, "no errors or warnings on that page, only three notes", and the notes. (Calls: design_session → add_words → lint_design.)

2. Change a word everywhere. "Rename the menu item 'Edit sports' to 'My sports' on every page, using the words tools, and tell me which pages changed." Calls: find_nodes({ design, query: "Edit sports" }) to see where, replace_text({ design, find, replace }) (a blind replace: it made "Select an thing" when asked to turn item into thing; tell the agent to replace the phrase first), or get_words / set_words for a copy pass. Run on Rally: replaced: 4.

3. A new page like an existing one. "Add a page 'Archive' like the Things page, listing the packed things only, and link it from the navigation." Calls: duplicate_page({ design, page: "Things" }) then rename_page, or add_page({ design, name, route, template: "project" }) (built the way the other pages are built), then set_props on the list. A new page joins the navigation itself. (add_page was run; duplicate_page was not.)

4. A field, from the database to the screen. "Add an optional note field to thing (max 120 characters), take it in the create form, and show it under each thing. Then tell me what I still have to do by hand." Calls: add_service_node (Field, then Param on the create), add_node (TextField with field: "draft.note"), set_props (a $bind to item.note), then regenerate({ migrate: true }). What is left by hand, and the agent should say so: apply the migration (cd backend && GLOBETROTTER_ENV=local uv run python -m …_core.migrate), and anything the binding does by hand. (Tutorial 1 and Rally exercise 2 are this prompt done by hand.)

5. Check and finish. "Run design_status for the whole design, fix what apply_fix can, then check_presses and check_accessibility on the Things page, and give me design_handoff." Calls: design_status, lint_design, apply_fix({ design, page, rule, nodeId }), check_presses and check_accessibility (they open the running app in a browser: start dev first), design_handoff({ design, page }). design_status and apply_fix were run; the two browser checks need Chromium and were run as the CLI's a11y instead (npx globetrotter a11y, which found one serious problem on the tutorial's page).

Two more you will want: "do the changes I pinned on the canvas" (list_asks: each ask pinned on a widget in the studio is a line for the agent; do it, then clear it with set_props(nodeId, { ask: null })), and "what does the backend still lack for my pages?" (propose_operations).

3. Rules to give the agent

Put these in the project's CLAUDE.md (the installer's text already holds the first four; they are worth repeating where the agent will read them):

  1. Change designs only through the globetrotter-design tools. If you must edit a designs/*.json by hand, run npx globetrotter sync right after. Never retry a failed call by rewriting the whole JSON: "the design changed on disk" means call it again.
  2. Never edit frontend/src/generated/* or the _contract, _core, _fastapi packages of the backend. Structure goes in the design, data and handlers in frontend/src/bindings/<page>.ts, backend rules in backend/packages/<app>_impl/.
  3. After a change run npx globetrotter sync, then npx globetrotter doctor. A change is not done while doctor has a ✗.
  4. A database change is a migration: sync writes it, you read it, nobody applies it without the person's word. regenerate({ migrate: true }) writes it; never --restart-migrations.
  5. Prove by using: after a page change look_at_page; after a backend change cd backend && uv run pytest -q; say what you saw, not that a command exited 0.
  6. Small, validated edits. A person may be watching the canvas.
  7. When a person states a rule (a colour, a word, "never delete"), call remember; start a session with recall. The project's memory is in designs/.memory/.
  8. Say what you could not check.

4. How a human reviews what an agent did

In the order that takes the least time:

  1. The summary the agent gives, then the same facts from the tool, which does not depend on the agent's memory: blame({ design }) lists the latest changes, newest first, with who made them and which tool:

    · 1 min ago (21:48 UTC) by claude-code (an agent, agent-ca924531): add_words page House rules · House rules #nrwura7n, Text “Bring a coat if it is cold.” #n6ed4nxe

    session_changes({ design }) is the same for the agent's own session; in a fresh process it says "This session has changed nothing …; pass since, a time or a span like 2h". blame({ design, node }) follows one widget.

  2. The diff. git diff --stat shows what is generated (many files; do not read them), what is design (designs/*.json; read this), and what is yours (bindings/, _impl/, tests; read these closely).

  3. The studio. Open the design: an agent at work shows on the canvas as a strip with its client's name; the top bar has Undo and the history; a widget's name in the panel says who changed it last.

  4. The checks, yourself:

    npx globetrotter sync --check
    npx globetrotter doctor
    (cd backend && uv run pytest -q)
    npx globetrotter status --since main     # on a branch: what got less ready than main

    and, with dev running, npx globetrotter a11y, npx globetrotter presses (every action pressed on a phone: a press that changes nothing in view and says nothing fails). npx globetrotter diff main makes before and after pictures of each page that changed (not run here).

  5. Look at it. Open the page. The agent's checks read the page; you read it as a person.

5. What it did well and badly in the run

It stayed inside the tools, answered briefly, and its lint reading ("three notes, all there before my change") was accurate. A tool-using agent is only as good as the tool answers: the long ones (a rename's report) are worth reading yourself, because a rename leaves a few things for a person: words in descriptions, the lines of your own code that name the old field, and a migration to apply.