Skip to content

Commit 233a018

Browse files
rekram1-nodejayair
andauthored
docs: contributing.md (anomalyco#3248)
Co-authored-by: Jay <air@live.ca>
1 parent d69beec commit 233a018

6 files changed

Lines changed: 159 additions & 35 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Bug report
2+
description: Report an issue that should be fixed
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: Describe the bug you encountered
10+
placeholder: What happened?
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: reproduce
16+
attributes:
17+
label: Steps to reproduce
18+
description: How can we reproduce this issue?
19+
placeholder: |
20+
1.
21+
2.
22+
3.
23+
validations:
24+
required: false
25+
26+
- type: textarea
27+
id: screenshot-or-link
28+
attributes:
29+
label: Screenshot and/or share link
30+
description: Run `/share` to get a share link, or attach a screenshot
31+
placeholder: Paste link or drag and drop screenshot here
32+
validations:
33+
required: false
34+
35+
- type: input
36+
id: os
37+
attributes:
38+
label: Operating System
39+
description: what OS are you using?
40+
placeholder: e.g., macOS 26.0.1, Ubuntu 22.04, Windows 11
41+
validations:
42+
required: false
43+
44+
- type: input
45+
id: terminal
46+
attributes:
47+
label: Terminal
48+
description: what terminal are you using?
49+
placeholder: e.g., iTerm2, Ghostty, Alacritty, Windows Terminal
50+
validations:
51+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 💬 Discord Community
4+
url: https://discord.gg/opencode
5+
about: For quick questions or real-time discussion. Note that issues are searchable and help others with the same question.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 🚀 Feature Request
2+
description: Suggest an idea, feature, or enhancement
3+
labels: [discussion]
4+
title: "[FEATURE]:"
5+
6+
body:
7+
- type: checkboxes
8+
id: verified
9+
attributes:
10+
label: Feature hasn't been suggested before.
11+
options:
12+
- label: I have verified this feature I'm about to request hasn't been suggested before.
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Describe the enhancement you want to request
18+
description: What do you want to change or add? What are the benefits of implementing this? Try to be detailed so we can understand your request better :)
19+
validations:
20+
required: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Question
2+
description: Ask a question
3+
labels: ["question"]
4+
body:
5+
- type: textarea
6+
id: question
7+
attributes:
8+
label: Question
9+
description: What's your question?
10+
validations:
11+
required: true

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to OpenCode
2+
3+
We want to make it easy for you to contribute to OpenCode. Here are the most common type of changes that get merged:
4+
5+
- Bug fixes
6+
- Additional LSPs / Formatters
7+
- Improvements to LLM performance
8+
- Support for new providers
9+
- Fixes for environment-specific quirks
10+
- Missing standard behavior
11+
- Documentation improvements
12+
13+
However, any UI or core product feature must go through a design review with the core team before implementation.
14+
15+
> [!IMPORTANT]
16+
> We do not accept PRs for core features.
17+
18+
Take a look at recent git history to understand what usually lands.
19+
20+
If you are unsure if a PR would be accepted, feel free to ask a maintainer or look for issues with either of the following labels:
21+
22+
- `help wanted`
23+
- `bug`
24+
25+
> [!NOTE]
26+
> PRs that ignore these guardrails will likely be closed.
27+
28+
Want to take on an issue? Leave a comment and a maintainer may assign it to you unless it is something we are already working on.
29+
30+
## Developing OpenCode
31+
32+
- Requirements: Bun 1.3+, Go 1.24.x.
33+
- Install dependencies and start the dev server from the repo root:
34+
35+
```bash
36+
bun install
37+
bun dev
38+
```
39+
40+
- Core pieces:
41+
- `packages/opencode`: OpenCode core business logic & server.
42+
- `packages/tui`: The TUI code, written in Go (will be removed soon in favor of [opentui](https://github.com/sst/opentui))
43+
- `packages/plugin`: Source for `@opencode-ai/plugin`
44+
45+
> [!NOTE]
46+
> After touching `packages/opencode/src/server/server.ts`, the OpenCode team must regenerate the Stainless SDK before any client updates merge.
47+
48+
## Pull Request Expectations
49+
50+
- Try to keep pull requests small and focused.
51+
- Link relevant issue(s) in the description
52+
- Explain the issue and why your change fixes it
53+
- Avoid having verbose LLM generated PR descriptions
54+
- Before adding new functions or functionality, ensure that such behavior doesn't already exist elsewhere in the codebase.
55+
56+
### Style Preferences
57+
58+
These are not strictly enforced, they are just general guidelines:
59+
60+
- **Functions:** Keep logic within a single function unless breaking it out adds clear reuse or composition benefits.
61+
- **Destructuring:** Do not do unnecessary destructuring of variables.
62+
- **Control flow:** Avoid `else` statements.
63+
- **Error handling:** Prefer `.catch(...)` instead of `try`/`catch` when possible.
64+
- **Types:** Reach for precise types and avoid `any`.
65+
- **Variables:** Stick to immutable patterns and avoid `let`.
66+
- **Naming:** Choose concise single-word identifiers when they remain descriptive.
67+
- **Runtime APIs:** Use Bun helpers such as `Bun.file()` when they fit the use case.
68+
69+
## Feature Requests
70+
71+
For net-new functionality, start with a design conversation. Open an issue describing the problem, your proposed approach (optional), and why it belongs in OpenCode. The core team will help decide whether it should move forward; please wait for that approval instead of opening a feature PR directly.

README.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,41 +54,7 @@ For more info on how to configure OpenCode [**head over to our docs**](https://o
5454

5555
### Contributing
5656

57-
OpenCode is an opinionated tool so any fundamental feature needs to go through a
58-
design process with the core team.
59-
60-
> [!IMPORTANT]
61-
> We do not accept PRs for core features.
62-
63-
However we still merge a ton of PRs - you can contribute:
64-
65-
- Bug fixes
66-
- Improvements to LLM performance
67-
- Support for new providers
68-
- Fixes for env specific quirks
69-
- Missing standard behavior
70-
- Documentation
71-
72-
Take a look at the git history to see what kind of PRs we end up merging.
73-
74-
> [!NOTE]
75-
> If you do not follow the above guidelines we might close your PR.
76-
77-
To run OpenCode locally you need.
78-
79-
- Bun 1.3 or higher
80-
- Golang 1.24.x
81-
82-
And run.
83-
84-
```bash
85-
$ bun install
86-
$ bun dev
87-
```
88-
89-
#### Development Notes
90-
91-
**API Client**: After making changes to the TypeScript API endpoints in `packages/opencode/src/server/server.ts`, you will need the OpenCode team to generate a new stainless sdk for the clients.
57+
If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request.
9258

9359
### FAQ
9460

0 commit comments

Comments
 (0)