@@ -12,37 +12,60 @@ diagnostics plus the context needed to reproduce and resolve it. |
12 | 12 |
|
13 | 13 | ## Workflow |
14 | 14 |
|
15 | | -1. Collect the standard diagnostics below. |
16 | | -2. Ask only for missing details that are necessary to reproduce or understand |
| 15 | +1. Check that it is a bug. Read the documentation page for the area at |
| 16 | + <https://opencode.ai/docs/>. If OpenCode works as documented, tell the user |
| 17 | + instead of filing an issue. |
| 18 | +2. Search for an existing issue with |
| 19 | + `gh issue list --repo anomalyco/opencode --state all --search "<keywords>"`. |
| 20 | + If one matches, give the user its URL and offer to add their details there |
| 21 | + instead of opening a new one. |
| 22 | +3. Collect the standard diagnostics below. Compare the opencode version with the |
| 23 | + latest release (`gh release view --repo anomalyco/opencode --json tagName`). |
| 24 | + If the user is behind, ask them to update and check whether it still happens. |
| 25 | +4. Ask only for missing details that are necessary to reproduce or understand |
17 | 26 | impact. |
18 | | -3. Draft the issue in the standard format below. |
19 | | -4. Publish it with GitHub CLI after the user confirms the title and body. |
| 27 | +5. Draft the issue in the standard format below. |
| 28 | +6. Publish it with GitHub CLI after the user confirms the title and body. |
20 | 29 |
|
21 | 30 | Do not publish an issue without user confirmation. If GitHub CLI is not |
22 | 31 | installed or not authenticated, explain the blocker and provide the exact issue |
23 | 32 | title/body for the user. |
24 | 33 |
|
25 | 34 | ## Standard Diagnostics |
26 | 35 |
|
| 36 | +The runtime diagnostics snapshot at the end of this skill already has most of |
| 37 | +these values. Use them, and only run commands for values it marks unavailable or |
| 38 | +that the user says differ, for example when the bug is in another install. |
| 39 | + |
27 | 40 | Collect these values when possible: |
28 | 41 |
|
29 | 42 | - opencode version: run `opencode --version`. |
| 43 | +- Client: the TUI, the desktop app, `opencode run`, the web app, or a server |
| 44 | + started with `opencode serve`. |
| 45 | +- Model and provider: the provider and model ID in use when the problem |
| 46 | + happened, if the problem involves a model. |
30 | 47 | - Operating system: run `uname -a` on Unix-like systems, or `ver` on Windows. |
31 | 48 | - Terminal: inspect `$TERM`, `$TERM_PROGRAM`, `$COLORTERM`, and any obvious |
32 | 49 | terminal app context the user provides. |
33 | 50 | - Shell: inspect `$SHELL` on Unix-like systems, or `%COMSPEC%`/`$ComSpec` on |
34 | 51 | Windows when relevant. |
35 | 52 | - Install/channel context: include whether this appears to be local, dev, beta, |
36 | 53 | or release if the version output or environment reveals it. |
37 | | -- Active plugins: inspect opencode config for configured plugins when possible. |
38 | | - Check likely config locations such as `opencode.json`, `opencode.jsonc`, |
39 | | - `.opencode/opencode.json`, and `~/.config/opencode/opencode.json`. Record |
40 | | - configured plugin entries, local plugin files under `.opencode/plugin/` or |
41 | | - `.opencode/plugins/`, and note if plugin status could not be determined. |
| 54 | +- Active plugins: the snapshot lists plugins from opencode config only. Also |
| 55 | + check `plugins` in `~/.config/opencode/cli.json` for terminal plugins, and |
| 56 | + local plugin files under `.opencode/plugin/` or `.opencode/plugins/`. Record |
| 57 | + plugin names and versions, and note if plugin status could not be determined. |
42 | 58 |
|
43 | 59 | If a diagnostic command fails, include `Unavailable` with the reason instead of |
44 | 60 | guessing. |
45 | 61 |
|
| 62 | +## Logs |
| 63 | + |
| 64 | +OpenCode writes logs to `opencode.log` in the log directory named in the |
| 65 | +snapshot, or `opencode-<channel>.log` for builds run from source. Find the |
| 66 | +lines around the failure, such as the error and the few lines before it, and |
| 67 | +include only those, at most about 40 lines. Never attach a whole log file. |
| 68 | + |
46 | 69 | ## User-Specific Context |
47 | 70 |
|
48 | 71 | Capture the details that make the issue actionable: |
@@ -57,8 +80,11 @@ Capture the details that make the issue actionable: |
57 | 80 | config, installing a plugin, changing terminal, or switching workspace. |
58 | 81 | - Workarounds tried and whether they helped. |
59 | 82 |
|
60 | | -Avoid pasting secrets. Redact tokens, API keys, private URLs, usernames, and |
61 | | -project-specific confidential data unless the user explicitly says it is safe. |
| 83 | +Include only what helps someone reproduce or fix the bug. Issues are public. |
| 84 | +Redact tokens, API keys, authorization headers, private URLs, usernames in paths, |
| 85 | +and project-specific confidential data unless the user explicitly says it is |
| 86 | +safe. Do not include prompts, conversation text, or file contents unless they are |
| 87 | +needed to reproduce the bug and the user agrees. |
62 | 88 |
|
63 | 89 | ## Issue Format |
64 | 90 |
|
@@ -73,6 +99,8 @@ otherwise: |
73 | 99 | ## Environment |
74 | 100 |
|
75 | 101 | - opencode version: <!-- value or Unavailable: reason --> |
| 102 | +- Client: <!-- TUI, desktop, run, web, or serve --> |
| 103 | +- Model and provider: <!-- provider/model, or Not relevant --> |
76 | 104 | - OS: <!-- value or Unavailable: reason --> |
77 | 105 | - Terminal: <!-- value or Unavailable: reason --> |
78 | 106 | - Shell: <!-- value or Unavailable: reason --> |
@@ -95,7 +123,7 @@ otherwise: |
95 | 123 |
|
96 | 124 | ## Additional Context |
97 | 125 |
|
98 | | -<!-- Logs, config snippets, screenshots, frequency, workarounds, related notes. --> |
| 126 | +<!-- Log excerpt, config snippets, screenshots, frequency, workarounds, related issues. --> |
99 | 127 | ``` |
100 | 128 |
|
101 | 129 | Keep the title short and searchable. Prefer the form: |
|