Guidelines for AI agents working in this repository.
oh-my-opencode-slim - Lightweight agent orchestration plugin for OpenCode. Built with TypeScript, Bun, and Biome.
| Command | Description |
|---|---|
bun run build |
Build to dist/ (index + cli + declarations) |
bun run typecheck |
TypeScript check without emit |
bun test |
Run all tests |
bun test -t "pattern" |
Run single test by name pattern |
bun run lint |
Biome lint |
bun run format |
Biome format with write |
bun run check |
Biome check with auto-fix (lint + format + imports) |
bun run check:ci |
Biome check without auto-fix (CI mode) |
bun run dev |
Build and run with OpenCode |
- Line width: 80 characters
- Indentation: 2 spaces
- Line endings: LF (Unix)
- Quotes: Single
- Trailing commas: Always
- Strict mode: Enabled
- Module: ESM with bundler resolution
- No explicit
any: Warning (disabled in test files) - Declarations: Auto-generated to
dist/
- Biome auto-organizes imports (
organizeImports: "on") - Let formatter handle sorting
- Use path aliases from
tsconfig.jsonif available
- Variables/functions: camelCase
- Classes/interfaces: PascalCase
- Constants: SCREAMING_SNAKE_CASE
- Files: kebab-case (PascalCase for React components)
- Use typed errors with descriptive messages
- Let errors propagate; avoid silent catches
- Use Zod for runtime validation
src/
├── index.ts # Main plugin export
├── cli/index.ts # CLI entry point
├── skills/ # Agent skills (published)
├── prompts/agents/ # Agent system prompts
├── background/ # Background task management
└── config/ # Configuration utilities
dist/ # Built output
docs/ # Documentation
@modelcontextprotocol/sdk- MCP protocol@opencode-ai/sdk- OpenCode SDKzod- Runtime validationvscode-languageserver-protocol- LSP support@ast-grep/cli- AST search/replace
- Make changes
bun run check:ci- verify lint/formatbun run typecheck- verify typesbun test- verify tests- Commit
- Biome integrates with git (VCS enabled)
- Commits must pass
bun run check:ci - Uses
.gitignorefor ignore patterns
Agent prompts and workflows are defined in src/prompts/agents/:
orchestrator.md- Main workflow (6-phase: Understand→Delegate→Split→Plan→Execute→Verify)explorer.md- Codebase search (read-only)librarian.md- External docs research (read-only)oracle.md- Strategic decisions (read-only)designer.md- UI/UX implementationfixer.md- Fast code changes
- Clarify first: Ask before guessing
- Minimum viable: Simplest working solution
- Reuse existing: Prefer existing utilities
- File limit: Keep files under 300 LOC
- No hardcoded secrets: Use environment variables
- Clean up: Delete temp files after use