From 7d9cef1aa83dfa752c87660ea84d310571a64d8a Mon Sep 17 00:00:00 2001 From: Val Alexander Date: Mon, 6 Jul 2026 02:37:22 -0500 Subject: [PATCH] docs: add AGENTS.md + CLAUDE.md agent-contributor guidance Canonical entry point for AI agents opening PRs: branch/PR workflow, local checks (pnpm run check = typecheck + tsx tests + plugin-runtime import guard + cargo test), the thin-adapter invariants, and contributor attribution (GitHub-linked Co-authored-by trailers, never .local emails). CLAUDE.md points at AGENTS.md. --- AGENTS.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 9 +++++++ 2 files changed, 82 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8de2e86 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,73 @@ +# AGENTS.md — desktop-use + +Guidance for **AI agents** (Codex, Claude Code, and any Coven familiar) opening +pull requests against this repo. Humans: your canonical guide is +[`CONTRIBUTING.md`](CONTRIBUTING.md) — this is the agent-specific layer on top. + +> **Read first:** [`README.md`](README.md) for what this repo is, and +> [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full contribution bar. + +--- + +## What this repo is (one line) + +`coven-desktop-use` is a small **external desktop-use adapter** for OpenClaw and +the Coven ecosystem (TypeScript with a Rust component). Keep it a thin adapter. + +## Branch & PR workflow (all agents) + +- **Never push to `main`.** Every change lands via a PR with green CI. Branch + from current `origin/main`. +- **Fresh branch per task**; use a worktree if multiple sessions may touch this + repo: + ```sh + git fetch origin main + git worktree add -b /tmp/desktopuse- origin/main + ``` +- Keep the diff scoped to one concern; conventional-commit subjects (`feat:`, + `fix:`, `docs:`, `chore:`, `refactor:`). +- After merge: delete the remote branch, remove your local worktree/branch. + +## Checks — run locally before opening the PR + +```sh +pnpm run check # typecheck + tsx tests + plugin-runtime-import guard + cargo test +``` + +Or individually: `pnpm run typecheck`, `pnpm run test:ts`, `cargo test`. Fix +failures rather than skipping them. + +## Repo-specific invariants (don't break these) + +- This is an **adapter**, not the agent runtime. Don't pull OpenClaw/Coven core + logic in here; keep the desktop-use surface thin and well-typed. +- Keep the plugin-runtime import boundary intact — `check:plugin-runtime-imports` + exists to enforce it and will fail the PR if you cross it. + +## Attribution — credit contributors correctly + +When you re-land or build on someone else's work (a fork PR, an issue author's +proposal, a co-author), **credit the human contributor with a working +GitHub-linked trailer** so they appear in the contributors graph: + +``` +Co-authored-by: Full Name +``` + +- Use the **numeric-id no-reply form**. Get the id with `gh api users/ --jq .id`. +- **Never** use a machine or `.local` email in a co-author trailer — it links to + no account and gives **zero** credit. +- When a squash-merge folds a contributor's PR into an internal branch, preserve + their `Co-authored-by:` line in the squash commit message. +- Credit **people**, not AI tools. + +## Secrets & safety + +- Never commit secrets, tokens, or private emails. Use `*.noreply.github.com` + for attribution. +- Don't disable CI gates or branch protection to land a change; surface the + blocker instead. + +## Claude Code + +`CLAUDE.md` points here — this file is the source of truth for both. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..5c27bb4 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,9 @@ +# CLAUDE.md — desktop-use + +**Read [`AGENTS.md`](AGENTS.md).** It is the canonical guide for AI agents +(including Claude Code) contributing to this repo — the adapter invariants, the +branch/PR workflow, local checks (`pnpm run check`), and contributor attribution. + +Claude Code auto-loads this file; everything you need lives in `AGENTS.md` plus +[`README.md`](README.md) and [`CONTRIBUTING.md`](CONTRIBUTING.md). There is no +separate Claude-only workflow — follow `AGENTS.md`.