Skip to content

Commit 3d21312

Browse files
docs: drop V1 references from opencode-dev skill (#58257)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
1 parent 6102079 commit 3d21312

1 file changed

Lines changed: 17 additions & 35 deletions

File tree

‎.opencode/skills/opencode-dev/SKILL.md‎

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
name: opencode-dev
3-
description: Use when interactively running, debugging, or verifying opencode's own V2 CLI/TUI or server during development in this repo — starting the dev TUI, driving it with termctrl, comparing V2 against the legacy TUI, hitting the V2 server/API directly, reading log files, or attaching Bun's inspector.
3+
description: Use when interactively running, debugging, or verifying opencode's own CLI/TUI or server during development in this repo — starting the dev TUI, driving it with termctrl, hitting the server/API directly, reading log files, or attaching Bun's inspector.
44
---
55

66
# Debugging opencode itself
77

8-
Workflow for interactively exercising the V2 CLI/TUI and server while developing in this repo. All commands below run from `packages/cli` unless noted otherwise.
8+
Workflow for interactively exercising the CLI/TUI and server while developing in this repo. All commands below run from `packages/cli` unless noted otherwise.
99

1010
## Server/client model
1111

12-
opencode V2 is a client/server system, not a single monolithic process:
12+
opencode is a client/server system, not a single monolithic process:
1313

1414
- **Server process** runs the Effect HTTP API (`packages/server`) and owns all domain state: sessions, database, plugins, permissions, Location services. It's started by the `serve` command (`packages/cli/src/commands/handlers/serve.ts`).
1515
- **TUI process** is a separate process that runs no application logic itself — it's an HTTP/SSE client of the server via `@opencode/client` (`OpenCode.make`).
@@ -31,62 +31,44 @@ opencode V2 is a client/server system, not a single monolithic process:
3131
- Use a dedicated session name and do not reuse or kill an unrelated session.
3232

3333
```bash
34-
termctrl start opencode-v2-dev --host opentui --cols 112 --rows 34 -- bun dev
35-
termctrl wait opencode-v2-dev "Ask anything" --timeout 20000
36-
termctrl show opencode-v2-dev
34+
termctrl start opencode-dev --host opentui --cols 112 --rows 34 -- bun dev
35+
termctrl wait opencode-dev "Ask anything" --timeout 20000
36+
termctrl show opencode-dev
3737
```
3838

3939
- Wait for visible text before interacting instead of relying on fixed sleeps. Use the text expected from the screen under test, such as `Ask anything` or `Connect a provider`.
4040
- Drive the running TUI with `termctrl send`. Prefix typed input with `text:` and send control keys separately so the interaction matches real terminal input.
4141

4242
```bash
43-
termctrl send opencode-v2-dev 'text:example prompt' enter
44-
termctrl send opencode-v2-dev ctrl-c
43+
termctrl send opencode-dev 'text:example prompt' enter
44+
termctrl send opencode-dev ctrl-c
4545
```
4646

4747
- Use `termctrl show` after each meaningful interaction and inspect the full visible screen for rendering errors, stale state, error toasts, and unexpected exits.
4848
- Save PNG evidence for every user-visible bug and fix. Do not save text captures; inspect the rendered PNG. Write temporary captures outside the repository unless the artifact is intended to be committed.
4949

5050
```bash
51-
termctrl save opencode-v2-dev --format png --out /tmp/opencode/v2-tui.png
51+
termctrl save opencode-dev --format png --out /tmp/opencode/tui.png
5252
```
5353

5454
- For resize-sensitive changes, resize the viewport, wait for the expected content, and capture the screen again:
5555

5656
```bash
57-
termctrl resize opencode-v2-dev --cols 100 --rows 30
58-
termctrl show opencode-v2-dev
57+
termctrl resize opencode-dev --cols 100 --rows 30
58+
termctrl show opencode-dev
5959
```
6060

61-
- Source changes may require restarting the process. Use `termctrl restart opencode-v2-dev` rather than assuming the running TUI reloaded the change. Restarting the TUI does not restart the shared background service, so run `bun dev service restart` after server-side changes, or use `--standalone`.
61+
- Source changes may require restarting the process. Use `termctrl restart opencode-dev` rather than assuming the running TUI reloaded the change. Restarting the TUI does not restart the shared background service, so run `bun dev service restart` after server-side changes, or use `--standalone`.
6262
- To exercise background-service behavior, use `bun dev service start`, `bun dev service status`, and `bun dev service stop`.
6363
- Always clean up the Terminal Control session when the check is complete:
6464

6565
```bash
66-
termctrl stop opencode-v2-dev
66+
termctrl stop opencode-dev
6767
```
6868

69-
## Comparing V2 against the legacy TUI
70-
71-
The legacy V1 CLI is still published as `opencode-ai` on npm; V2 is `@opencode/cli`. Run both versions in separate Terminal Control sessions and save PNG-only captures at equivalent states:
72-
73-
```bash
74-
# From packages/cli: local V2 TUI
75-
termctrl start opencode-v2-dev --host opentui --cols 112 --rows 34 -- bun dev
76-
77-
# Released legacy V1 TUI behavior reference
78-
termctrl start opencode-legacy --host opentui --cols 112 --rows 34 -- bunx opencode-ai@latest
79-
80-
termctrl save opencode-v2-dev --format png --out /tmp/opencode/v2.png
81-
termctrl save opencode-legacy --format png --out /tmp/opencode/legacy.png
82-
```
83-
84-
- Use the same viewport and send equivalent inputs to both sessions before comparing screenshots. The released CLI is a behavioral reference, not a source of V2 API design; keep the local implementation on V2 endpoints.
85-
- Stop both sessions after comparison: `termctrl stop opencode-v2-dev` and `termctrl stop opencode-legacy`.
86-
8769
## Server/API debugging
8870

89-
- Use `bun dev api --help` from `packages/cli` to inspect the API debugging command. It sends one request to the V2 server using the same daemon discovery/auth path as the CLI.
71+
- Use `bun dev api --help` from `packages/cli` to inspect the API debugging command. It sends one request to the server using the same daemon discovery/auth path as the CLI.
9072
- Use `bun dev api` to introspect the server-side data backing the TUI. This is useful when debugging UI bugs: compare what the screen renders with the raw session, message, event, agent, or health data returned by the API to determine whether the bug is in the server state, the client data layer, or the TUI rendering.
9173
- `bun dev api` accepts either an OpenAPI operation ID or a raw HTTP method plus path:
9274

@@ -223,15 +205,15 @@ Use `opencode-local.log` for a local/dev process. Load the completed `.cpuprofil
223205

224206
## Debugger
225207

226-
- To debug the V2 CLI or TUI with Bun's inspector, launch the CLI entrypoint through Terminal Control with an inspector URL, then attach a debugger to that URL:
208+
- To debug the CLI or TUI with Bun's inspector, launch the CLI entrypoint through Terminal Control with an inspector URL, then attach a debugger to that URL:
227209

228210
```bash
229-
termctrl start opencode-v2-debug --host opentui --cols 112 --rows 34 -- \
211+
termctrl start opencode-debug --host opentui --cols 112 --rows 34 -- \
230212
bun run --inspect=ws://localhost:6499/ src/index.ts
231213
```
232214

233215
- Use `--inspect-wait` or `--inspect-brk` when execution must pause until a debugger attaches.
234-
- Use `termctrl logs opencode-v2-debug` for inspector output or startup failures emitted before the TUI renderer starts. Use `termctrl show` for the visible full-screen TUI.
216+
- Use `termctrl logs opencode-debug` for inspector output or startup failures emitted before the TUI renderer starts. Use `termctrl show` for the visible full-screen TUI.
235217

236218
## Verification
237219

0 commit comments

Comments
 (0)