Skip to content

Commit dec19cf

Browse files
committed
Docs: Improve agent instructions
1 parent a4e87f1 commit dec19cf

2 files changed

Lines changed: 39 additions & 20 deletions

File tree

.claude/commands/plan.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
Plan a feature implementation.
1+
Plan the feature implementation we discussed.
22

3-
1. Check the `docs/` folder and colocated `CLAUDE.md` files for context. Read `docs/design-principles.md` for product
4-
design values.
3+
1. Collect context from related `CLAUDE.md` files or `docs/`, as needed.
4+
Read [design-principles.md](../../docs/design-principles.md)) to remember our core product design values.
55
2. Save the plan to `docs/specs/{feature}-plan.md`.
6-
3. Capture the INTENTION behind each decision, not just the steps. The implementing agent or human should know the "why"s and be able to adapt dynamically.
7-
4. Create an accompanying task list to the end of the plan that fully covers but doesn't duplicate the plan on a high level. If all items are honestly marked done, the plan is fully implemented in great quality. Tasks should be one-liners, grouped by milestones. Include docs, testing, and running all necessary checks.
8-
5. Don't enter "Plan mode" unless specifically asked to.
6+
3. Capture the INTENTION behind each decision, not just the steps. The implementing agent or human should know the "why"
7+
s and be able to adapt dynamically!
8+
4. Use milestones if needed. Make sure to include the necessary docs updates roughly, testing (Unit? Integration? E2E?),
9+
and running all necessary checks.
10+
5. Leave notes about what can be executed in parallel, but only if it's extremely safe and needs no worktrees; we're
11+
usually not in a hurry and sequential running is totally fine.
12+
6. DO NOT enter "Plan mode" unless specifically asked to "Enter plan mode". Use docs/specs.
13+
7. Get an Opus agent to review the plan with fresh eyes, and point out any mistakes. Then fix up the plan based on that.
14+
Link the most crucial docs and design principles to the agent.
15+
8. Do this review round again and again, until the reviewer agent has no meaningful input, or maximum 5 times.

docs/design-principles.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
# Design principles
22

3-
- Always make features extremely user-friendly.
4-
- Always apply radical transparency: make the internals of what's happening available. Hide the details from the surface
5-
so the main UI is not cluttered.
6-
- For longer processes: 1. show a progress indicator (an anim), 2. a progress bar and counter if we know the end state
7-
(for example, how many files we're loading), and 3. a time estimate if we have a guess how long it'll take.
8-
- Always keep accessibility in mind. Features should be available to people with impaired vision, hearing, and cognitive
9-
disabilities.
10-
- All actions longer than ~1 second should be immediately cancelable, canceling not just the UI but any background
11-
processes as well, to avoid wasting the user's resources.
12-
- Prefer elegant architecture over quick hacks, but don't refactor beyond what the task requires.
13-
- When shortcuts are available for a feature, always display the shortcut in a tooltip or somewhere less prominent than
14-
the main UI.
15-
For concrete tokens and component patterns, see [design-system.md](design-system.md).
16-
3+
- Prefer an elegant architecture over quick hacks. We have time to do outstanding work, and we are in this for the long
4+
run.
175
- **Platform-native, not generic.** The app should look and feel as if it was specifically made for the user's OS. Never
186
generalize user-facing text, labels, or behavior to be "cross-platform" — instead, fork by OS. On macOS, say "Finder",
197
"Trash", "System Settings". On Linux, say "file manager", "Trash" (FreeDesktop spec), and use DE-specific terminology
208
where possible. Windows (later) gets its own native terms too. This applies to error messages, menu labels, tooltips,
219
and any user-visible string. Use `isMacOS()` / `cfg(target_os)` to branch — a few extra lines of platform-specific
2210
text are always better than one watered-down generic string.
11+
- Always apply radical transparency: make the internals of what's happening available. Like, don't just put a "Syncing"
12+
spinner but write exactly what's happening. Don't overshare/overcomplicate, but the user must understand what's
13+
happening to an extent that they could explain it to someone else if asked.
14+
- Always make features extremely user-friendly. The UI should help the user accomplish their goals with minimal
15+
friction.
16+
- This is a keyboard-first app. Everything must work with the mouse, too, but we should make it easy and straightforward
17+
to use all features with the keyboard.
18+
- When shortcuts are available for a feature, always display the shortcut in a tooltip or somewhere less prominent than
19+
the main UI.
20+
- For longer processes:
21+
1. Always run the process in the background. Blocking the UI or other actions is an absolute no-go.
22+
2. Show some anim to communicate that the app is doing something.
23+
3. If we know what the end state looks like and we can quantify the progress, show a progress bar and counter.
24+
4. If we have a guess how long the operation will take, show an ETA.
25+
5. Progress bars staying longer at 100% than at 99% or any other percentage is NOT allowed. If we're done with the
26+
part of an operation that we could quantify and displayed a progress bar for it but we have something else to do
27+
(e.g. we loaded the data and now we're making calculations on the data), then it's a new state, show another
28+
state!
29+
- All actions longer than ~1 second should be immediately cancelable, canceling not just the UI but any background
30+
processes as well, to avoid wasting the user's resources. If rolling back is an option, we should consider that too.
31+
- Always keep accessibility in mind. Features should be available to people with impaired vision, hearing, and cognitive
32+
disabilities.
33+
34+
For concrete tokens and component patterns, see [design-system.md](design-system.md).

0 commit comments

Comments
 (0)