Skip to content

Commit d2a5e9a

Browse files
committed
docs: update and fmt
1 parent 4463436 commit d2a5e9a

File tree

9 files changed

+121
-29
lines changed

9 files changed

+121
-29
lines changed

.github/actions/setup-cmux/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: 'Setup Cmux'
2-
description: 'Setup Bun and install dependencies with caching'
1+
name: "Setup Cmux"
2+
description: "Setup Bun and install dependencies with caching"
33
runs:
4-
using: 'composite'
4+
using: "composite"
55
steps:
66
- name: Setup Bun
77
uses: oven-sh/setup-bun@v2
@@ -18,4 +18,4 @@ runs:
1818
1919
- name: Install dependencies
2020
shell: bash
21-
run: bun install --frozen-lockfile
21+
run: bun install --frozen-lockfile

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
permissions:
8-
contents: write # Required for electron-builder to upload release assets
8+
contents: write # Required for electron-builder to upload release assets
99

1010
jobs:
1111
build-macos:

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ like [opportunistic compaction](https://cmux.io/context-management.html) and [mo
4444

4545
## Quick Install
4646

47+
> [!WARNING]
48+
> cmux is in a Preview state. You will encounter bugs and performance issues.
49+
> It's still possible to be highly productive. We are using it almost exclusively for our own development.
50+
4751
Download pre-built binaries from [the releases page](https://github.com/coder/cmux/releases):
4852

4953
- **macOS**: Signed and notarized DMG (separate builds for Intel/Apple Silicon)

docs/SUMMARY.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
# Summary
22

3+
# Introduction
4+
35
- [Introduction](./intro.md)
46
- [Install](./install.md)
57
- [Why Parallelize?](./why-parallelize.md)
8+
9+
# Features
10+
611
- [Models](./models.md)
712
- [Keyboard Shortcuts](./keybinds.md)
813
- [Vim Mode](./vim-mode.md)
914
- [Context Management](./context-management.md)
10-
- [System Prompt](./system-prompt.md)
1115
- [Instruction Files](./instruction-files.md)
1216
- [Project Secrets](./project-secrets.md)
13-
- [Agentic Git Identity](./agentic-git-identity.md)
17+
- [Agentic Git Identity](./agentic-git-identity.md)
18+
19+
# Advanced
20+
21+
- [Prompting Tips](./prompting-tips.md)
22+
- [System Prompt](./system-prompt.md)
23+
24+
# Development
25+
1426
- [Terminal Benchmarking](./benchmarking.md)
1527
- [AGENTS](./AGENTS.md)

docs/prompting-tips.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Prompting Tips
2+
3+
> Some tips and tricks from the cmux developers on getting the most out of your agents.
4+
5+
## Persist lessons
6+
7+
When you notice agents make the same class of mistake repeatedly, ask them to modify their `AGENTS.md`
8+
to prevent the mistake from happening again. We have found this pattern is most effective when:
9+
10+
- You specify the size of the change
11+
- LLMs love fluff — always specify a size constraint like "change at most two sentences"
12+
- Ask the agent to focus on the general lesson, not the specific mistake
13+
14+
Codebases often have "watering hole" type files that are read in the course of
15+
certain types of changes. For example, you may have a central file defining an API interface. When
16+
the lesson is only relevant to a particular type of change it's often better to persist lessons as
17+
source comments in such files vs. expanding the global `AGENTS.md`.
18+
19+
## Define the loop
20+
21+
Agents thrive on TDD. Try to define their task in terms of what checks need to pass before they
22+
can claim success.
23+
24+
For cmux development, we have a [`wait_pr_checks.sh`](https://github.com/coder/cmux/blob/main/scripts/wait_pr_checks.sh) script
25+
that polls GitHub and ensures that:
26+
27+
- There are no dirty changes
28+
- All checks pass
29+
- All review comments are resolved
30+
- There are no merge conflicts
31+
32+
Create a similar script for your project and try asking your agent to work persistently until it
33+
passes.
34+
35+
## Aggressively prune context
36+
37+
Even though Sonnet 4.5 has up to 1M in potential context, we experience a noticeable improvement in
38+
quality when kept <100k tokens. We suggest running `/compact -c "<what you want next>"`
39+
often to keep context small. The `-c` flag will automatically send a follow up message post-compaction
40+
to keep the session flowing.
41+
42+
## Keeping code clean
43+
44+
Some prompts that help you keep the codebase clean:
45+
46+
Elevate the fix to design level:
47+
48+
- We keep seeing this class of bug in component X, fix this at a design level
49+
- There's bug X, provide a fix that solves the whole class of bugs
50+
51+
At the end of a long session before compaction, try asking:
52+
53+
- How can the code/architecture be improved to make similar changes easier?
54+
- What notes in AGENTS.md would make this change easier for future Assistants?
55+
56+
At end of long session (ideally after compaction), try asking:
57+
58+
- DRY your work
59+
- Strive for net LoC reduction
60+
- Review in depth, simplify

docs/theme/custom.css

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
--color-interrupted: hsl(38 92% 50%);
2424

2525
/* Docs-specific tokens */
26+
--color-code: hsl(214.52deg 100% 71.11%);
2627
--link-color: var(--color-plan-mode);
2728
--link-hover: var(--color-plan-mode-hover);
2829
--content-max-width: 78ch;
@@ -48,6 +49,7 @@
4849
--sidebar-fg: var(--color-text) !important;
4950
--icons: var(--color-text-secondary) !important;
5051
--table-alternate-bg: var(--color-background-secondary) !important;
52+
--line-height: 1.6;
5153
}
5254

5355
/* Base layout and typography */
@@ -63,14 +65,15 @@ body {
6365

6466
.content .page,
6567
.content {
68+
line-height: var(--line-height);
6669
background: var(--color-background) !important;
6770
}
6871

6972
.content .chapter {
7073
max-width: var(--content-max-width);
7174
margin: 0 auto;
7275
padding: 2rem 2.25rem;
73-
line-height: 1.65;
76+
line-height: var(--line-height);
7477
letter-spacing: 0.01em;
7578
}
7679

@@ -142,6 +145,10 @@ a:focus-visible {
142145
background: var(--sidebar-bg) !important;
143146
border-right: 1px solid var(--color-border) !important;
144147
}
148+
.sidebar .part-title {
149+
color: color-mix(in srgb, var(--color-text), white 20%) !important;
150+
font-weight: 700;
151+
}
145152
.sidebar .chapter li.chapter-item a {
146153
color: var(--color-text) !important;
147154
}
@@ -150,8 +157,8 @@ a:focus-visible {
150157
background: transparent !important;
151158
}
152159
.sidebar .chapter li.chapter-item a:hover {
153-
color: var(--color-text) !important;
154-
background: color-mix(in srgb, var(--color-background-secondary), white 2%);
160+
color: var(--link-hover) !important;
161+
background: color-mix(in srgb, var(--color-background-secondary), white 8%);
155162
}
156163
.sidebar-resize-handle {
157164
background: var(--color-background-secondary) !important;
@@ -205,16 +212,25 @@ a:focus-visible {
205212
}
206213

207214
.content ul {
208-
line-height: 2;
215+
margin-block-start: 0;
216+
line-height: 1.6;
217+
}
218+
219+
.content p {
220+
line-height: var(--line-height);
221+
}
222+
223+
/* Remove margin between p and following list */
224+
p:has(+ ul),
225+
p:has(+ ol) {
226+
margin-block-end: 0.5em;
209227
}
210228

211229
/* Inline code */
212230
:not(pre) > code {
213231
background: var(--color-background-secondary) !important;
214-
color: var(--color-edit-mode) !important;
215-
border-radius: var(--radius-xs);
232+
color: var(--color-code) !important;
216233
padding: 2px 6px;
217-
border: 1px solid var(--color-border);
218234
font-family: var(--font-monospace);
219235
font-size: 0.92em;
220236
}
@@ -223,14 +239,13 @@ a:focus-visible {
223239
pre {
224240
background: var(--color-background-secondary) !important;
225241
border: 1px solid var(--color-border) !important;
226-
border-radius: var(--radius-md);
227242
box-shadow: var(--shadow-1);
228243
overflow: auto;
229244
margin: 1rem 0;
230245
}
231246
pre > code {
232247
background: transparent !important;
233-
color: var(--color-text) !important;
248+
color: var(--color-code) !important;
234249
display: block;
235250
padding: 0.9rem 1rem;
236251
font-family: var(--font-monospace);
@@ -251,7 +266,7 @@ table {
251266
border-radius: var(--radius-md);
252267
}
253268
table thead {
254-
background: color-mix(in srgb, var(--color-background-secondary), black 5%);
269+
background: color-mix(in srgb, var(--color-background-secondary), white 8%);
255270
border-bottom: 2px solid var(--color-border) !important;
256271
}
257272
table th,
@@ -262,26 +277,28 @@ table td {
262277
color: var(--color-text) !important;
263278
}
264279
table th {
265-
font-weight: 600;
280+
font-weight: 700;
281+
font-size: 1.05em;
282+
color: color-mix(in srgb, var(--color-text), white 10%) !important;
266283
}
267284
table tbody tr:hover {
268285
background: color-mix(in srgb, var(--color-background-secondary), white 2%) !important;
269286
}
270287
table code {
271288
background: var(--color-background) !important;
272-
color: var(--color-interrupted) !important;
289+
color: var(--color-code) !important;
273290
font-family: var(--font-monospace);
274291
font-size: 0.9em;
275292
}
276293

277294
/* Blockquotes (callout style) */
278295
blockquote {
296+
border: 1px solid var(--color-border) !important;
279297
border-left: 4px solid var(--color-plan-mode) !important;
280298
background: color-mix(in srgb, var(--color-background-secondary), white 1.5%) !important;
281-
padding: 1rem 1.2rem;
299+
padding: 0.5rem 0.6rem;
282300
margin: 1.2rem 0;
283301
color: color-mix(in srgb, var(--color-text), white 6%) !important;
284-
border-radius: 0 var(--radius-md) var(--radius-md) 0;
285302
}
286303
blockquote strong {
287304
color: var(--color-plan-mode) !important;

playwright.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ export default defineConfig({
1111
fullyParallel: true,
1212
forbidOnly: isCI,
1313
retries: isCI ? 1 : 0,
14-
reporter: [
15-
["list"],
16-
["html", { outputFolder: "artifacts/playwright-report", open: "never" }],
17-
],
14+
reporter: [["list"], ["html", { outputFolder: "artifacts/playwright-report", open: "never" }]],
1815
use: {
1916
trace: isCI ? "on-first-retry" : "retain-on-failure",
2017
screenshot: "only-on-failure",

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd "$PROJECT_ROOT"
99

1010
# Check for PNG files in docs - suggest WebP instead
1111
echo "Checking for PNG files in docs..."
12-
PNG_FILES=$(find docs -name "*.png" 2>/dev/null || true)
12+
PNG_FILES=$(git ls-files 'docs/*.png' 'docs/**/*.png' 2>/dev/null || true)
1313
if [ -n "$PNG_FILES" ]; then
1414
echo "❌ Error: PNG files found in docs directory. Please use WebP format instead:"
1515
echo "$PNG_FILES"

src/utils/main/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# utils/main
22

3-
**Main process utilities only.**
3+
**Main process utilities only.**
44

5-
This directory contains utilities that depend on Node.js APIs (fs, path, os, etc.)
5+
This directory contains utilities that depend on Node.js APIs (fs, path, os, etc.)
66
and can only be used in the main Electron process.
77

88
## Architecture Boundary
99

10-
An ESLint rule prevents renderer code (components, hooks, contexts) from importing
10+
An ESLint rule prevents renderer code (components, hooks, contexts) from importing
1111
from this directory. This ensures:
1212

1313
- No Node.js APIs leak into the browser bundle
@@ -17,13 +17,15 @@ from this directory. This ensures:
1717
## When to Add Code Here
1818

1919
Place utilities here if they:
20+
2021
- Use Node.js filesystem APIs (fs, fs/promises)
2122
- Access OS-level information (os module)
2223
- Perform system-level operations (child_process, etc.)
2324

2425
## When NOT to Use
2526

2627
If your utility:
28+
2729
- Works with pure data transformations → `src/utils/`
2830
- Needs to be shared with renderer → `src/utils/` or use IPC
2931
- Is frontend-specific → `src/utils/` or component helpers

0 commit comments

Comments
 (0)