agentleFS
waynesuttonwaynesutton/clawsync/docs/AGENTS.md

clawsync

AGENTS.md70 starsChanged 10 months agoMITView on GitHub

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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.

The file

Show its rules and text

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

18 rules. About 3 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈3

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Start Convex backend: npx convex dev

    line 8
  2. Very specific:

    Start frontend dev server: npm run dev

    line 9
  3. Distinctive:

    Use Convex validators, not Zod, inside Convex functions

    line 22
  4. Very specific:

    All components registered in convex/convex.config.ts via app.use().

    line 49
  5. Very specific:

    Never import directly from a component's internal files.

    line 54
  6. Very specific:

    Never use .collect() without .take(n) on tables that could grow.

    line 58
  7. Very specific:

    Every query must use a defined index from schema.ts.

    line 59
  8. Distinctive:

    All mutations and actions validate their arguments.

    line 63
  9. Common:

    Never store API keys or secrets in source code or in skillRegistry.config.

    line 68
  10. Common:

    Never return secret values from any query, mutation, or action.

    line 70
  11. Distinctive:

    No HTTP redirects followed in webhook caller (SSRF prevention).

    line 74
  12. Distinctive:

    Test skill invocations using the dry-run feature in SyncBoard.

    line 77
  13. Distinctive:

    Verify the security checker blocks unapproved skills.

    line 78
  14. Distinctive:

    Test webhook handlers with invalid signatures (should return 401).

    line 79
  15. Distinctive:

    Test rate limiting by sending requests above the configured limit.

    line 80
  16. Distinctive:

    Verify summary table cron produces correct aggregations.

    line 81
  17. Very specific:

    Run npm run lint and npm run typecheck before committing.

    line 84
  18. Common:

    Never commit .env files or API keys.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

AGENTS.md

Project overview

ClawSync is an open source AI agent platform. React + TypeScript + Vite frontend. Convex backend. The agent uses @convex-dev/agent for thread management, tool calling, and streaming. Multi-model support via AI SDK.

Setup commands

  • Install deps: npm install
  • Start Convex backend: npx convex dev
  • Start frontend dev server: npm run dev
  • Build for production: npm run build
  • Deploy Convex functions: npx convex deploy
  • Run tests: npm test
  • Lint: npm run lint
  • Type check: npm run typecheck

Code style

  • TypeScript strict mode
  • React functional components with hooks only
  • No class components
  • Single quotes, semicolons
  • Convex functions always validate args with v.object({})
  • Use Convex validators, not Zod, inside Convex functions
  • Zod is used in frontend form validation only
  • Named exports preferred over default exports

Architecture

Backend (convex/)

  • convex/schema.ts: Full database schema. Every table needs indexes for its query patterns.
  • convex/agent/clawsync.ts: Agent definition. Do not hardcode tools here.
  • convex/agent/toolLoader.ts: Loads tools dynamically from skillRegistry and MCP servers.
  • convex/agent/security.ts: Security checker. Runs on every tool invocation. Do not modify without explicit review.
  • convex/agent/modelRouter.ts: Resolves which AI SDK provider and model to use from config.
  • convex/agent/skills/templates/: Generic executors for template and webhook skills.
  • convex/mcp/: MCP server (outbound) and client (inbound) integration.
  • convex/webhooks/: Channel webhook handlers. Each must verify platform signatures.
  • convex/crons.ts: Background jobs (summary aggregation, health checks, cleanup).

Frontend (src/)

  • src/pages/: One component per route. Route names map to URL paths.
  • src/components/chat/: Public-facing chat UI components.
  • src/components/syncboard/: SyncBoard admin UI components.
  • src/styles/tokens.css: CSS custom properties for the design system. Do not use hardcoded colors.

Content

  • content/soul.md: Default soul document. Fork owners replace this.

Convex components

  • All components registered in convex/convex.config.ts via app.use().
  • Components are sandboxed: own tables, own functions, can't access app data.
  • Access components via import { components } from "./_generated/api".
  • Core components: @convex-dev/agent, @convex-dev/rate-limiter, @convex-dev/action-cache.
  • To add a component: npm install, add import + app.use() to convex.config.ts, run npx convex dev.
  • Never import directly from a component's internal files. Use the components object.
  • Component mutations participate in the same transaction as your code (atomic rollback).

Convex rules

  • Never use .collect() without .take(n) on tables that could grow.
  • Every query must use a defined index from schema.ts.
  • Dashboard reads go to summary tables (cold), not log tables (hot).
  • Store large data (>10KB) in Convex file storage, reference by ID.
  • Background cron jobs must not share cursors with real-time operations.
  • All mutations and actions validate their arguments.
  • Internal functions use internalMutation/internalAction/internalQuery.

Security rules

  • convex/agent/security.ts must run on every tool invocation. No exceptions.
  • Never store API keys or secrets in source code or in skillRegistry.config.
  • Secrets go in skillSecrets or channelSecrets tables (encrypted).
  • Never return secret values from any query, mutation, or action.
  • New skills default to approved: false, status: "pending".
  • Webhook handlers must verify platform-specific signatures before processing.
  • Domain allowlist checked on every webhook skill invocation.
  • No HTTP redirects followed in webhook caller (SSRF prevention).

Testing

  • Test skill invocations using the dry-run feature in SyncBoard.
  • Verify the security checker blocks unapproved skills.
  • Test webhook handlers with invalid signatures (should return 401).
  • Test rate limiting by sending requests above the configured limit.
  • Verify summary table cron produces correct aggregations.

PR guidelines

  • Run npm run lint and npm run typecheck before committing.
  • Include tests for new skills or security-related changes.
  • Any change to security.ts requires a note in the PR description explaining why.
  • Schema changes must include index definitions for new query patterns.
  • Never commit .env files or API keys.

Download now (ZIP)

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.