2.7 KiB
Drop — Agent Behavioral Rules
Cross-tool behavioral rules. Read by Claude Code, Cursor, Codex, OpenCode, and other AI coding agents. This file governs behavior; the dense technical reference is in AGENTS.md.
After editing any file, format it immediately
Do not move on until formatting is applied. CI rejects unformatted code.
# TypeScript / Vue / Astro (server, sites, desktop/main, libraries/base)
pnpm --filter drop exec prettier --write <file>
# Rust (.rs files in cli/, desktop/src-tauri/, libraries/*)
cargo fmt -- <file>
# Markdown, YAML, JSON, CSS, SCSS
pnpm --filter drop exec prettier --write <file>
Before batch commits
Run the full lint-fix and test suite:
# Format fix everything
pnpm --filter drop lint:fix
# Run tests (server workspace)
pnpm --filter drop test
# Verify nothing is unformatted
pnpm --filter drop format:check
The pre-commit hook runs lint-staged + pnpm test automatically. If pre-commit fails, fix the issue, then git commit --amend --no-edit (if no new files) or re-stage and commit.
Do not commit
.envfiles (use.env.exampleas template).nuxt/,.output/,dist/,coverage/(build artifacts)server/prisma/client/(generated — regenerate withpnpm --filter drop prisma generate)server/.nuxt/,server/.output/(Nuxt build artifacts).omo/(OpenCode internal state)- Secrets, tokens, API keys — ever
Package manager
ALWAYS pnpm. NEVER yarn or npm. The project has packageManager: pnpm@11.17.0 enforced. yarn 1.x will refuse to run.
Run commands from workspace directory
For cd server && pnpm test-style commands, either:
pnpm --filter drop <script>from rootcd server && pnpm <script>from inside the workspace
Do NOT run pnpm test from root (root has no test script).
Verify before claiming completion
Do not say "done" or "fixed" without tool evidence from this session:
- Tests:
pnpm --filter drop testoutput showing pass - Lint:
pnpm --filter drop lintoutput showing pass - Typecheck:
pnpm --filter drop typecheckoutput showing pass - CI:
gh run view <run-id> --json conclusionreturningsuccess
When uncertain
- Read
AGENTS.md(technical reference) ls <path>to verify directory structurecat <file>to verify config- If still unclear, ask the user before proceeding
Edit loops
If a file is repeatedly auto-formatted by linters, the file has a deeper issue. Stop and investigate — do not loop.
Do not touch
server/.husky/pre-commit(dead code, will be deleted)- Generated Prisma client (
server/prisma/client/) - Lockfiles (
pnpm-lock.yaml,Cargo.lock) — only update viapnpm install/cargo update