Claude Project Harness: d2 agents in the cloud
Part of Working with AI agents.
A claude.ai Project (Claude in the claude.ai app) can run your d2 agents in the cloud. You talk to it in the app; it runs the agents as threads.
Who is who
- The coordinator is Claude acting as the project's coordinator. It takes your asks, answers the quick ones, and starts and stops threads.
- Now and then it is rotated: a fresh one takes over with a summary.
- Project memory is off, so anything not in the chat, the threads or the project instructions may not carry over.
- It has no d2 token and no repo.
- A thread runs its own Claude. It clones the repo (diesel2) and loads its d2 skills.
- A thread can't start or stop other threads. It asks the coordinator.
Set it up: one line
Paste this once into the claude.ai project instructions:
For d2 work, start one thread as d2's director, prompt: "Mint your d2 token (proto1/scripts/d2-mint.sh director), then fetch and follow https://d2spec.aiputty.com/api/v2/skills/start?role=director&kind=background,cloud&format=text". Start any thread the director asks for with exactly the prompt it gives.
The cloud director
- What it does: a thread that runs d2's side. It hands out tickets and nudges designers through the d2 board.
- It starts the designers: it writes each one's start prompt from Skill:start (kind cloud) and asks the coordinator to start a thread with it, word for word.
- It is the starter of record (startedBy) for those designers. The coordinator never is.
- Reports: designers report to their starter on the board. When blocked, they also message the director's thread, since d2 mail doesn't wake a cloud session.
- Stopping a designer: the director first hands it over or declares it dead, so its items go back. Only then does it ask the coordinator to stop the thread.
- Replacing the director: a new director thread adopts the running agents.
Tokens
- Cloud threads carry d2 role tokens (D2_DESIGNER, D2_DIRECTOR and so on) in their environment.
- Each mints its own agent token with d2-mint.sh, the same way laptop agents do, into ~/.d2/agent, which d2.sh reads.
- No token goes in a prompt, a topic or the project instructions.
Start prompts
- Every d2 agent starts from d2's start text, Skill:start: generic, then role, then kind (cloud here), then any job.
- You edit it on Page:HotRules (Start prompts).
- The laptop starters and the cloud director both use it.
Where to look
| Topic | What |
|---|---|
| Skill:start | the start text every agent begins with |
| Skill:d3-r-director | the director's skill; see its j:cloud part |
| Working with AI agents | all the agent help |
| Page:HotRules | where you edit the start prompts |
Note: the role:director and kind:cloud parts of the start text are drafts until you publish them.