This document provides guidelines for AI agents operating in this repository.
oh-my-opencode-slim - A lightweight agent orchestration plugin for OpenCode, a slimmed-down fork of oh-my-opencode. Built with TypeScript, Bun, and Biome.
| Command | Description |
|---|---|
bun run build |
Build TypeScript to dist/ (both index.ts and cli/index.ts) |
bun run typecheck |
Run TypeScript type checking without emitting |
bun test |
Run all tests with Bun |
bun run lint |
Run Biome linter on entire codebase |
bun run format |
Format entire codebase with Biome |
bun run check |
Run Biome check with auto-fix (lint + format + organize imports) |
bun run check:ci |
Run Biome check without auto-fix (CI mode) |
bun run dev |
Build and run with OpenCode |
Running a single test: Use Bun's test filtering with the -t flag:
bun test -t "test-name-pattern"- Formatter/Linter: Biome (configured in
biome.json) - Line width: 80 characters
- Indentation: 2 spaces
- Line endings: LF (Unix)
- Quotes: Single quotes in JavaScript/TypeScript
- Trailing commas: Always enabled
- Strict mode: Enabled in
tsconfig.json - No explicit
any: Generates a linter warning (disabled for test files) - Module resolution:
bundlerstrategy - Declarations: Generate
.d.tsfiles indist/
- Biome auto-organizes imports on save (
organizeImports: "on") - Let the formatter handle import sorting
- Use path aliases defined in TypeScript configuration if present
- Variables/functions: camelCase
- Classes/interfaces: PascalCase
- Constants: SCREAMING_SNAKE_CASE
- Files: kebab-case for most, PascalCase for React components
- Use typed errors with descriptive messages
- Let errors propagate appropriately rather than catching silently
- Use Zod for runtime validation (already a dependency)
- Biome integrates with git (VCS enabled)
- Commits should pass
bun run check:cibefore pushing
oh-my-opencode-slim/
├── src/ # TypeScript source files
├── dist/ # Built JavaScript and declarations
├── node_modules/ # Dependencies
├── biome.json # Biome configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project manifest and scripts
@modelcontextprotocol/sdk- MCP protocol implementation@opencode-ai/sdk- OpenCode AI SDKzod- Runtime validationvscode-jsonrpc/vscode-languageserver-protocol- LSP support
- Make code changes
- Run
bun run check:cito verify linting and formatting - Run
bun run typecheckto verify types - Run
bun testto verify tests pass - Commit changes
- This is an OpenCode plugin - most functionality lives in
src/ - The CLI entry point is
src/cli/index.ts - The main plugin export is
src/index.ts - Skills are located in
src/skills/(included in package publish)