---
tags: ai, examples
description: Sample prompts to give your AI, and what came back, by kind of user
---
# Example AI prompts

Prompts to give your AI when it works on a d2 project, and the answers they got, grouped by the kind of user (Hero, Creator, Pro; see [[Help]]). Collected from the landing page, the home page templates and [[Help]] on 2026-09-27, plus real ones from building d2 itself. Where no answer was kept, the entry says what should come back.

## Getting started {#getting-started}

```prompt
List the topics in my d2 project.
```

> Home and the rest of your project's topics. If it does, your AI is connected. (From [[Help]], step 4.)

```prompt
Make an app that shows …
```

> An `App:` topic holding a whole HTML page, opened at `/app/<name>`, with a card for it on your home page. (From [[Help]], apps.)

```prompt
In d2, make me a stylesheet called yahoo: the logo in the top bar says YAHOO, the background is dark green and the fonts are magenta.
```

> A `Style:yahoo` topic you can pick on [Styles](/styles); if a line is wrong, the page says which. (From [[Help]], styles.)

## Hero {#hero}

Your own app, with your data behind it.

```prompt
Build me an app to track my portfolio: my holdings, what I paid, today's price, and tell me when a company I hold puts out news.
```

> A working app with lists, pages and alerts, filled with your own data; change your mind and the app changes with it. The finished example is [d2portfolio](https://d2portfolio.aiheroapps.com). (From the landing page, Hero.)

```prompt
Import the portfolio example into my project and put in my three biggest holdings instead of the samples.
```

> The portfolio's topics copied into your project, its card on your home page, your holdings in place of the samples. (From the Hero home page.)

```prompt
I ride trails on my mountain bike. Keep track of the trails, when I rode them and the conditions, and show me which ones I haven't done in a while.
```

> Not kept yet (the Bike trails example is coming). (From the Hero home page.)

```prompt
Make me a garden planner: my beds, what's planted where, when I watered, and remind me what's due this week.
```

> Not kept yet (the Garden example is coming). (From the Hero home page.)

```prompt
Track my monthly budget: categories, what I planned and what I spent, and warn me when a category goes over.
```

> Not kept yet (the Budget example is coming). (From the Hero home page.)

## Creator {#creator}

Describe a domain. Use the app it becomes, right away.

```prompt
Create a domain model for a mining company: its properties and claims, the deposits and their resource estimates, drill programs with holes and assays, and who owns what. Seed it with a few sample companies and let me see it.
```

> The classes in a `Spec:` topic, sample companies as objects, and the model graph at [Domain](https://d2pro.aiheroapps.com/domain/overview), browsable in Data right away. The worked example is in the d2pro demo (`Spec:mining-domain`, `Story:mining-samples`). (From the landing page, Creator.)

## Pro {#pro}

Prototype big domains, rules and APIs, fast. From building d2 itself, in d2spec.

```prompt
add backlog to d2spec home as tile. users can redo their default home pages and drop system bits like backlog, system view etc. We need a Toolbox page that lists these, linked from the User menu - move Backlog from there into it. the new page has tiles for all system views (backlog, system view, domain, data, flows, fiddle etc) List there as tiles
```

> […]
>
> Also done: the queued rename (10b4347, its own commit). The code, tests, seeds and READMEs now use the new topic names, so the components view reads Components again and the menu's Spec link goes to /topics/Spec. I checked the components page on the box; it shows its components again. The queue is empty and its note is deleted.
>
> It's recorded in Spec §7.16, UiSpec §4, Routes, Testing (TB-1) and the ProjectLog, all under the new names
>
> The backlog feature we just did, Spec §7.15, still mixes the two. It has the status markers, the Done-section rule and the draft mechanics. Want me to give it the same treatment?


```prompt
yes, update the spec/uispec/design respectively. from now on we work per feature - i.e. a feature should belong either in the big spec and/or the uispec and has design/implementation and testing sections with a nice anchor so they line up in the system wide view. put that in the best practices […]
separately, users should have a handle like "bob" - on registration get this from the email "bob@…" and in preferences they should be able to change it. this handle is what we show in conflicts page etc - current users migrate them accordingly. update spec etc
also let admins see other's drafts and check that item
on checkpoints, publish drafts from all chats and anon
and collect this prompt and answer in the examples
```

> Handles are live: every user got one from the first part of their email, changeable in Preferences, and they replace emails on the drafts page, in conflicts and on the members list. Admins now see other people's drafts with their diffs, and that to-do is ticked.
>
> Working per feature is now BestPractices §1.7: each feature in Spec and/or UiSpec, with Design, Prototype1 and Testing sections sharing one anchor. Draft conflicts and handles are the first two done that way, lined up as `drafts` and `handles` in the system-wide view.
>
> All of it is drafts, to publish at the next checkpoint, with every other chat's and the ops token's.
(Razie, 2026-09-27.)

```prompt
from now on, when we add new relevant functionality, it should be in the toolbox page. So we don't lose track of it.
```

> From now on, any new feature a person can open gets a Toolbox tile in the same change that builds it.
>
> - **The rule** is in the Design 15 draft.
> - **The project preferences** have it too, so future chats follow it.
> - **The code chat** has a notice in the queue.
(Razie, 2026-09-27; dictated, the content chat answering.)

```prompt
in the pipeline for my items, i.e. user, administrator, etc., I should have a small close button near the arrows, before the arrows. Put the space between that button and the arrows. So I can close my items from there. I don't have to dig inside it.
```

> The close button is designed and written into the drafts:
>
> - **UiSpec, Pipeline: Close from the row.** On your own items only (user, administrator, designer…), a small **✓** sits just before the ↑ ↓ arrows, with a clear gap between them. One tap closes the item; the row fades out and a toast offers **Undo** for a few seconds. On a phone the ✓ stays on the row while the arrows go into the row's menu. Items for agents or other people have no ✓.
> - **Spec:** ^pipe-42, plus a line in 11. Decisions.
> - **Design:** no new route; the ✓ uses the existing status change, and Undo sets the item back to its previous status.
> - **Testing:** design test PIPE-43.
>
> The Undo toast is my addition, because the ✓ sits right next to the arrows and is easy to hit by accident.
>
> **The coder is waiting on you.** It has finished P-98 (v0.62.0 preview) and asks whether to take P-116 or P-86 next.
>
> OK to send the close button to the coder?
(Razie, 2026-09-28; dictated, the designer answering.)

```prompt
I think he's already working on the close button.
```

> You're right. The coder is working on P-117 (close from the row) together with P-116 (sync every element), so there's nothing to send.
>
> The coder also left me a design call, P-114: work meant for agents should be filed for `<role> agent`, not `<role>`, because otherwise it shows up red as yours. I'll file it that way from now on.
>
> The coder isn't waiting on anyone right now. For me, the next items are the design calls from the first review: P-105, P-107 and P-89.
(Razie, 2026-09-28; dictated, the designer answering. Razie had already approved the close button in the coder's own chat; the item just didn't say so.)

```prompt
add your last two answer and my prompts to the example chats.
```

> I added both exchanges to ExampleAiPrompts, Pro, as a draft: the close-button request with its design answer, and your "already working on it" with my reply.
>
> In the second entry I noted that the coder had picked up the close button from my board notice before you'd approved it. That goes against the rule that design reaches the coder only after your review. Say if you want the coder told to wait for an explicit hand-off.
(Razie, 2026-09-28; dictated, the designer answering.)

```prompt
No, it's okay. He asked me and I approved it there in his chat. He should have left a note that it was approved specifically by me.
```

> Got it, that's fixed:
>
> - **ExampleAiPrompts, Pro:** the note now says you had already approved the close button in the coder's chat, and the item just didn't record it.
> - **BestPractices, 3.4 Roles:** new rule. When you approve something in a chat, that chat notes it on the pipeline item ("approved by Razie in the <role> chat, <date>") and in its board notice.
> - I sent the coder a board message asking it to add that note to P-117 now.
(Razie, 2026-09-28; dictated, the designer answering. Shows the designer holding the review rule, and Razie's correction becoming a standing practice.)

