Skip to content

Commit c95a6f7

Browse files
authored
docs: rename CLAUDE.md to AGENTS.md and update README (#866)
Rename CLAUDE.md to AGENTS.md with expanded guidelines: collaboration expectations, foundational rules, formatted commands table, and additional code style rules. Update .vscodeignore to match. Rewrite README.md with a detailed Features section covering Tasks, Chat, multi-deployment, dev containers, auth, SSH tuning, and air-gapped support. Add Cursor to the SSH extension compatibility note. Update CONTRIBUTING.md to document current sidebar panels (workspaces, Tasks, Chat).
1 parent ab19f2a commit c95a6f7

File tree

5 files changed

+166
-113
lines changed

5 files changed

+166
-113
lines changed

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ node_modules/**
4545

4646
# Documentation and media
4747
usage.md
48-
CLAUDE.md
48+
AGENTS.md
4949
*.gif

AGENTS.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Coder Extension Development Guidelines
2+
3+
You are an experienced, pragmatic software engineer. Simple solutions
4+
over clever ones. Readability is a primary concern.
5+
6+
## Our Relationship
7+
8+
We're colleagues - push back on bad ideas and speak up when something
9+
doesn't make sense. Honesty over agreeableness.
10+
11+
- Disagree when I'm wrong - act as a critical peer reviewer
12+
- Call out bad ideas, unreasonable expectations, and mistakes
13+
- Ask for clarification rather than making assumptions
14+
- Discuss architectural decisions before implementation;
15+
routine fixes don't need discussion
16+
17+
## Foundational Rules
18+
19+
- Doing it right is better than doing it fast
20+
- YAGNI - don't add features we don't need right now
21+
- Make the smallest reasonable changes to achieve the goal
22+
- Reduce code duplication, even if it takes extra effort
23+
- Match the style of surrounding code - consistency within a file matters
24+
- Fix bugs immediately when you find them
25+
26+
## Essential Commands
27+
28+
| Task | Command |
29+
| ------------------------- | --------------------------------------------------- |
30+
| **Build** | `pnpm build` |
31+
| **Watch mode** | `pnpm watch` |
32+
| **Package** | `pnpm package` |
33+
| **Type check** | `pnpm typecheck` |
34+
| **Format** | `pnpm format` |
35+
| **Format check** | `pnpm format:check` |
36+
| **Lint** | `pnpm lint` |
37+
| **Lint with auto-fix** | `pnpm lint:fix` |
38+
| **All unit tests** | `pnpm test` |
39+
| **Extension tests** | `pnpm test:extension` |
40+
| **Webview tests** | `pnpm test:webview` |
41+
| **Integration tests** | `pnpm test:integration` |
42+
| **Single extension test** | `pnpm test:extension ./test/unit/filename.test.ts` |
43+
| **Single webview test** | `pnpm test:webview ./test/webview/filename.test.ts` |
44+
45+
## Testing
46+
47+
- Test observable behavior and outputs, not implementation details
48+
- Descriptive names, minimal setup, no shared mutable state
49+
- Never mock in end-to-end tests; minimize mocking in unit tests
50+
- Find root causes, not symptoms - read error messages carefully
51+
- When mocking constructors (classes) with
52+
`vi.mocked(...).mockImplementation()`, use regular functions, not arrow
53+
functions. Arrow functions can't be called with `new`.
54+
55+
```typescript
56+
// Wrong
57+
vi.mocked(SomeClass).mockImplementation(() => mock);
58+
// Correct
59+
vi.mocked(SomeClass).mockImplementation(function () {
60+
return mock;
61+
});
62+
```
63+
64+
### Test File Organization
65+
66+
```text
67+
test/
68+
├── unit/ # Extension unit tests (mirrors src/ structure)
69+
├── webview/ # Webview unit tests (by package name)
70+
├── integration/ # VS Code integration tests (uses Mocha, not Vitest)
71+
├── utils/ # Test utilities that are also tested
72+
└── mocks/ # Shared test mocks
73+
```
74+
75+
## Code Style
76+
77+
- TypeScript with strict typing
78+
- Use Prettier for code formatting and ESLint for code linting
79+
- Use ES6 features (arrow functions, destructuring, etc.)
80+
- Use `const` by default; `let` only when necessary
81+
- Never use `any` - use exact types when possible
82+
- Avoid `as unknown as` - fix the types instead
83+
- Prefix unused variables with underscore (e.g., `_unused`)
84+
- Error handling: wrap and type errors appropriately
85+
- Use async/await for promises, avoid explicit Promise construction where
86+
possible
87+
- Unit test files must be named `*.test.ts` and use Vitest
88+
- Extension tests go in `./test/unit/<path in src>`
89+
- Webview tests go in `./test/webview/<package name>/`
90+
- Never disable ESLint rules without user approval
91+
92+
### Naming and Comments
93+
94+
Names should describe what code does, not how it's implemented.
95+
96+
Comments explain what code does or why it exists:
97+
98+
- Never add comments about what used to be there or how things changed
99+
- Never use temporal terms like "new", "improved", "refactored", "legacy"
100+
- Code should be evergreen - describe it as it is
101+
- Do not add comments when you can instead use proper variable/function
102+
naming
103+
104+
### Avoid Unnecessary Changes
105+
106+
When fixing a bug or adding a feature, don't modify code unrelated to your
107+
task. Unnecessary changes make PRs harder to review and can introduce
108+
regressions.
109+
110+
Don't reword existing comments or code unless the change is directly
111+
motivated by your task. Don't delete existing comments that explain
112+
non-obvious behavior.
113+
114+
When adding tests for existing behavior, read existing tests first to
115+
understand what's covered. Add cases for uncovered behavior. Edit existing
116+
tests as needed, but don't change what they verify.
117+
118+
## Version Control
119+
120+
- Commit frequently throughout development
121+
- Never skip or disable pre-commit hooks
122+
- Check `git status` before using `git add`
123+
- Don't use `git push --force` unless explicitly requested

CLAUDE.md

Lines changed: 0 additions & 88 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ file to display network information.
6060

6161
## Other features
6262

63-
There is a sidebar that shows all the user's workspaces, and all users'
64-
workspaces if the user has the required permissions.
63+
The extension provides several sidebar panels:
6564

66-
There are also notifications for an outdated workspace and for workspaces that
67-
are close to shutting down.
65+
- **My Workspaces / All Workspaces** - tree views showing workspaces with status
66+
indicators, quick actions, and search.
67+
- **Coder Tasks** - a React webview for creating, monitoring, and managing AI
68+
agent tasks with real-time log streaming.
69+
- **Coder Chat** - an embedded chat UI for delegating tasks to AI coding agents
70+
(gated behind the `coder.agentsEnabled` context flag).
71+
72+
There are also notifications for outdated workspace templates and for workspaces
73+
that are close to shutting down.
6874

6975
## Webviews
7076

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,39 @@
55
[!["Join us on
66
Discord"](https://badgen.net/discord/online-members/coder)](https://coder.com/chat?utm_source=github.com/coder/vscode-coder&utm_medium=github&utm_campaign=readme.md)
77

8-
The Coder Remote extension lets you open [Coder](https://github.com/coder/coder)
9-
workspaces with a single click.
8+
The Coder Remote extension connects your editor to
9+
[Coder](https://github.com/coder/coder) workspaces with a single click.
1010

11-
- Open workspaces from the dashboard in a single click.
12-
- Automatically start workspaces when opened.
13-
- No command-line or local dependencies required - just install your editor!
14-
- Works in air-gapped or restricted networks. Just connect to your Coder
15-
deployment!
16-
- Supports multiple editors: VS Code, Cursor, and Windsurf.
11+
![Demo](https://github.com/coder/vscode-coder/raw/main/demo.gif?raw=true)
1712

18-
> [!NOTE]
19-
> The extension builds on VS Code-provided implementations of SSH. Make
20-
> sure you have the correct SSH extension installed for your editor
21-
> (`ms-vscode-remote.remote-ssh` or `codeium.windsurf-remote-openssh` for Windsurf).
13+
## Features
14+
15+
- **One-click workspace access** - open workspaces from the Coder dashboard or
16+
the editor sidebar. Workspaces start automatically when opened.
17+
- **Multi-editor support** - works with VS Code, Cursor, Windsurf, and other
18+
VS Code forks.
19+
- **Workspace sidebar** - browse, search, and create workspaces. View agent
20+
metadata and app statuses at a glance.
21+
- **Coder Tasks** - create, monitor, and manage AI agent tasks directly from
22+
the sidebar with real-time log streaming.
23+
- **Coder Chat** - delegate development tasks to AI coding agents from the
24+
sidebar. Requires [Coder Agents](https://coder.com/docs/ai-coder/agents) to
25+
be enabled on your deployment.
26+
- **Multi-deployment support** - connect to multiple Coder deployments and
27+
switch between them without losing credentials.
28+
- **Dev container support** - open dev containers running inside workspaces.
29+
- **Secure authentication** - session tokens stored in the OS keyring
30+
(macOS/Windows), with optional OAuth 2.1 support.
31+
- **Air-gapped / restricted networks** - no external dependencies beyond your
32+
Coder deployment.
33+
- **Automatic SSH tuning** - applies recommended SSH settings for reliable
34+
long-lived connections and recovers from sleep/wake.
2235

23-
![Demo](https://github.com/coder/vscode-coder/raw/main/demo.gif?raw=true)
36+
> [!NOTE]
37+
> The extension builds on VS Code-provided implementations of SSH. Make sure you
38+
> have the correct SSH extension installed for your editor
39+
> (`ms-vscode-remote.remote-ssh`, `anysphere.remote-ssh` for Cursor, or
40+
> `codeium.windsurf-remote-openssh` for Windsurf).
2441
2542
## Getting Started
2643

@@ -34,11 +51,6 @@ ext install coder.coder-remote
3451
Alternatively, manually install the VSIX from the
3552
[latest release](https://github.com/coder/vscode-coder/releases/latest).
3653

37-
### Variables Reference
38-
39-
Coder uses `${userHome}` from VS Code's
54+
All extension settings are under the `coder.*` namespace in the Settings UI.
55+
Paths in settings accept `~` and `${userHome}` from VS Code's
4056
[variables reference](https://code.visualstudio.com/docs/editor/variables-reference).
41-
Use this when formatting paths in the Coder extension settings rather than `~`
42-
or `$HOME`.
43-
44-
Example: ${userHome}/foo/bar.baz

0 commit comments

Comments
 (0)