Try to keep things in one function unless composable or reusable
DO NOT do unnecessary destructuring of variables
DO NOT use else statements unless necessary
DO NOT use try/catch if it can be avoided
AVOID try/catch where possible
AVOID else statements
AVOID using any type
AVOID let statements
PREFER single word variable names where possible
Use as many bun apis as possible like Bun.file()
Architecture
Tools: Implement Tool.Info interface with execute() method
Context: Pass sessionID in tool context, use App.provide() for DI
Validation: All inputs validated with Zod schemas
Logging: Use Log.create({ service: "name" }) pattern
Storage: Use Storage namespace for persistence
API Client: Go TUI communicates with TypeScript server via stainless SDK. When adding/modifying server endpoints in packages/opencode/src/server/server.ts, ask the user to generate a new client SDK to proceed with client-side changes.