agentleFS
chriswritescode-devchriswritescode-dev/opencode-manager/AGENTS.md

opencode-manager

AGENTS.md912 starsChanged 3 days agoMITView on GitHub

We split this AGENTS.md into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No console logs (use Bun's logger or proper error handling)

    line 21
  2. Very specific:

    Follow existing route/service/utility structure

    line 29
  3. Distinctive:

    Use async/await consistently, avoid .then() chains

    line 30
  4. Distinctive:

    Test coverage: 80% minimum required

    line 31
  5. Distinctive:

    Use React hooks properly, no direct state mutations

    line 39
  6. Distinctive:

    Use SOLID principles throughout design and implementation:

    line 44
  7. Distinctive:

    Interface Segregation: Prefer small, specific interfaces over large, general ones—clients shouldn’t depend on methods they don’t use.

    line 48
  8. Distinctive:

    Never leave dead code: remove unused code, commented-out blocks, and unused variables/imports.

    line 51
  9. Very specific:

    Use shared types from workspace package (@opencode-manager/shared)

    line 53
  10. Distinctive:

    Prefer pnpm over npm for all package management

    line 55
  11. Very specific:

    Run pnpm lint after completing tasks to ensure code quality

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

OpenCode WebUI - Agent Guidelines

Commands

  • pnpm dev - Start both backend (5003) and frontend (5173)
  • pnpm dev:backend - Backend only: NODE_ENV=development bun --watch backend/src/index.ts
  • pnpm dev:frontend - Frontend only: pnpm --filter frontend dev
  • pnpm build - Build CLI, backend, and frontend
  • pnpm test - Run CLI, backend, and frontend tests
  • cd backend && pnpm exec vitest run <filename> - Run single test file
  • cd backend && pnpm exec vitest --ui - Interactive test UI
  • cd backend && pnpm exec vitest run --coverage - Coverage report (80% threshold)
  • cd backend && bun test <filename> - Run a Bun-only suite, excluded from Vitest (test/routes/internal-sandbox.test.ts, src/routes/repos.test.ts)
  • pnpm lint - Lint CLI, frontend, and backend
  • pnpm lint:backend - Backend linting
  • pnpm lint:frontend - Frontend linting

Code Style

  • Doc comments only in new and changed code: JSDoc/TSDoc attached to the declaration they document, in the language's native doc convention. No inline, explanatory, or section comments; code must be self-documenting
  • No console logs (use Bun's logger or proper error handling)
  • Strict TypeScript everywhere, proper typing required
  • Named imports only: import { Hono } from 'hono', import { useState } from 'react'

Backend (Bun + Hono)

  • Hono framework with Zod validation, Bun SQLite (bun:sqlite) database
  • Error handling with try/catch and structured logging
  • Follow existing route/service/utility structure
  • Use async/await consistently, avoid .then() chains
  • Test coverage: 80% minimum required

Frontend (React + Vite)

  • @/ alias for components: import { Button } from '@/components/ui/button'
  • Radix UI + Tailwind CSS, React Hook Form + Zod
  • React Query (@tanstack/react-query) for state management
  • ESLint TypeScript rules enforced
  • Use React hooks properly, no direct state mutations

General

  • DRY principles, follow existing patterns
  • Use SOLID principles throughout design and implementation:
    • Single Responsibility: Each module/class/function should have one reason to change—keep responsibilities focused.
    • Open/Closed: Entities should be open for extension, closed for modification—prefer adding new code over altering stable code.
    • Liskov Substitution: Subtypes must be substitutable for their base types—no breaking expected behavior when swapping implementations.
    • Interface Segregation: Prefer small, specific interfaces over large, general ones—clients shouldn’t depend on methods they don’t use.
    • Dependency Inversion: Depend on abstractions, not concretions—inject dependencies and avoid hard-coding implementations.
  • YAGNI: Don’t build or keep code you don’t need. If you change something, remove the unused parts. use the new code or keep the old, but don’t keep both.
  • Never leave dead code: remove unused code, commented-out blocks, and unused variables/imports.
  • temp/opencode is a reference clone of OpenCode 2 at tag v2.0.15 (gitignored, never committed)
  • Use shared types from workspace package (@opencode-manager/shared)
  • OpenCode server runs on port 5551, backend API on port 5003
  • Prefer pnpm over npm for all package management
  • Run pnpm lint after completing tasks to ensure code quality

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.