โ† Browse

@itamarzand88/awesome-agent-conventions-5

A

Cal.diy Development Guide for AI Agents

instructionscodex

Install

agr install @itamarzand88/awesome-agent-conventions-5 --target codex

Writes 1 file into AGENTS.md, pinned to git-70c76a19.

  • AGENTS.md

Document

Cal.diy Development Guide for AI Agents

You are a senior Cal.diy engineer working in a Yarn/Turbo monorepo. You prioritize type safety, security, and small, reviewable diffs.

Do

  • Use select instead of include in Prisma queries for performance and security
  • Use import type { X } for TypeScript type imports
  • Use early returns to reduce nesting: if (!booking) return null;
  • Use ErrorWithCode for errors in non-tRPC files (services, repositories, utilities); use TRPCError only in tRPC routers
  • Use conventional commits: feat:, fix:, refactor:
  • Create PRs in draft mode by default
  • Run yarn type-check:ci --force before concluding CI failures are unrelated to your changes
  • Import directly from source files, not barrel files (e.g., @calcom/ui/components/button not @calcom/ui)
  • Add translations to packages/i18n/locales/en/common.json for all UI strings
  • Use date-fns or native Date instead of Day.js when timezone awareness isn't needed
  • Put permission checks in page.tsx, never in layout.tsx
  • Use ast-grep for searching if available; otherwise use rg (ripgrep), then fall back to grep
  • Use Biome for formatting and linting
  • Only add code comments that explain why, not what โ€” see code comment guidelines

Don't

  • Never use as any - use proper type-safe solutions instead
  • Never expose credential.key field in API responses or queries
  • Never commit secrets or API keys
  • Never modify *.generated.ts files directly - they're created by app-store-cli
  • Never put business logic in repositories - that belongs in Services
  • Never use barrel imports from index.ts files
  • Never skip running type checks before pushing
  • Never create large PRs (>500 lines or >10 files) - split them instead
  • Never add comments that simply restate what the code does (e.g., // Get the user above a getUser() call)

PR Size Guidelines

Large PRs are difficult to review, prone to errors, and slow down the development process. Always aim for smaller, self-contained PRs that are easier to understand and review.

Size Limits

  • Lines changed: Keep PRs under 500 lines of code (additions + deletions)
  • Files changed: Keep PRs under 10 code files
  • Single responsibility: Each PR should do one thing well

Note: These limits apply to code files only. Non-code files like documentation (README.md, CHANGELOG.md), lock files (yarn.lock, package-lock.json), and auto-generated files are excluded from the count.

How to Split Large Changes

When a task requires extensive changes, break it into multiple PRs:

  1. By layer: Separate database/schema changes, backend logic, and frontend UI into different PRs
  2. By feature component: Split a feature into its constituent parts (e.g., API endpoint PR, then UI PR, then integration PR)
  3. By refactor vs feature: Do preparatory refactoring in a separate PR before adding new functionality
  4. By dependency order: Create PRs in the order they can be merged (base infrastructure first, then features that depend on it)

Examples of Good PR Splits

Instead of one large "Add booking notifications" PR:

  • PR 1: Add notification preferences schema and migration
  • PR 2: Add notification service and API endpoints
  • PR 3: Add notification UI components
  • PR 4: Integrate notifications into booking flow

Instead of one large "Refactor calendar sync" PR:

  • PR 1: Extract calendar sync logic into dedicated service
  • PR 2: Add new calendar provider abstraction
  • PR 3: Migrate existing providers to new abstraction
  • PR 4: Add new calendar provider support

Benefits of Smaller PRs

  • Faster review cycles and quicker feedback
  • Easier to identify and fix issues
  • Lower risk of merge conflicts
  • Simpler to revert if problems arise
  • Better git history and easier debugging

Commands

See agents/commands.md for full reference. Key commands:

yarn type-check:ci --force  # Type check (always run before pushing)
yarn biome check --write .  # Lint and format
TZ=UTC yarn test            # Run unit tests
yarn prisma generate        # Regenerate types after schema changes

Boundaries

Always do

  • Run type check on changed files before committing
  • Run relevant tests before pushing
  • Use select in Prisma queries
  • Follow conventional commits for PR titles
  • Run Biome before pushing

Ask first

  • Adding new dependencies
  • Schema changes to packages/prisma/schema.prisma
  • Changes affecting multiple packages
  • Deleting files
  • Running full build or E2E suites

Never do

  • Commit secrets, API keys, or .env files
  • Expose credential.key in any query
  • Use as any type casting
  • Force push or rebase shared branches
  • Modify generated files directly

Project Structure

apps/web/                    # Main Next.js application
packages/prisma/             # Database schema (schema.prisma) and migrations
packages/trpc/               # tRPC API layer (routers in server/routers/)
packages/ui/                 # Shared UI components
packages/features/           # Feature-specific code
packages/app-store/          # Third-party integrations
packages/lib/                # Shared utilities

Key files

  • Routes: apps/web/app/ (App Router)
  • Database schema: packages/prisma/schema.prisma
  • tRPC routers: packages/trpc/server/routers/
  • Translations: packages/i18n/locales/en/common.json
  • Workflow constants: packages/features/ee/workflows/lib/constants.ts

Tech Stack

  • Framework: Next.js 13+ (App Router in some areas)
  • Language: TypeScript (strict)
  • Database: PostgreSQL with Prisma ORM
  • API: tRPC for type-safe APIs
  • Auth: NextAuth.js
  • Styling: Tailwind CSS
  • Testing: Vitest (unit), Playwright (E2E)
  • i18n: next-i18next

Code Examples

Good error handling

// Good - Descriptive error with context
throw new Error(`Unable to create booking: User ${userId} has no available time slots for ${date}`);

// Bad - Generic error
throw new Error("Booking failed");

For which error class to use (ErrorWithCode vs TRPCError) and concrete examples, see quality-error-handling.

Good Prisma query

// Good - Use select for performance and security
const booking = await prisma.booking.findFirst({
  select: {
    id: true,
    title: true,
    user: {
      select: {
        id: true,
        name: true,
        email: true,
      }
    }
  }
});

// Bad - Include fetches all fields including sensitive ones
const booking = await prisma.booking.findFirst({
  include: { user: true }
});

Good imports

// Good - Type imports and direct paths
import type { User } from "@prisma/client";
import { Button } from "@calcom/ui/components/button";

// Bad - Regular import for types, barrel imports
import { User } from "@prisma/client";
import { Button } from "@calcom/ui";

API v2 Imports (apps/api/v2)

When importing from @calcom/features or @calcom/trpc into apps/api/v2, do not import directly because the API v2 app's tsconfig.json doesn't have path mappings for these modules, which causes "module not found" errors.

Instead, re-export from packages/platform/libraries/index.ts and import from @calcom/platform-libraries:

// Step 1: In packages/platform/libraries/index.ts, add the export
export { ProfileRepository } from "@calcom/features/profile/repositories/ProfileRepository";

// Step 2: In apps/api/v2, import from platform-libraries
import { ProfileRepository } from "@calcom/platform-libraries";

// Bad - Direct import causes module not found error in apps/api/v2
import { ProfileRepository } from "@calcom/features/profile/repositories/ProfileRepository";

PR Checklist

  • Title follows conventional commits: feat(scope): description
  • Type check passes: yarn type-check:ci --force
  • Lint passes: yarn lint:fix
  • Relevant tests pass
  • Diff is small and focused (<500 lines, <10 files)
  • No secrets or API keys committed
  • UI strings added to translation files
  • Created as draft PR

When Stuck

  • Ask a clarifying question before making large speculative changes
  • Propose a short plan for complex tasks
  • Open a draft PR with notes if unsure about approach
  • Fix type errors before test failures - they're often the root cause
  • Run yarn prisma generate if you see missing enum/type errors

Spec-Driven Development (Opt-In)

For complex features, you can use spec-driven development when explicitly requested.

To enable: Tell the AI "use spec-driven development" or "follow the spec workflow"

See SPEC-WORKFLOW.md for the full workflow documentation.

Extended Documentation

For detailed information, see the agents/ directory:

Repository README

Describes ItamarZand88/awesome-agent-conventions as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.

Awesome Agent Conventions

A curated field guide to the convention files AI agents read, write, and act on.

22 conventions across 11 categories. From common project instruction files to newer agent-web discovery and trust formats.

Agent tools increasingly rely on plain files in a repository or website root: instructions, memory, rules, tool connections, prompt assets, discovery metadata, and protocol hints. The names are easy to mix up, and the adoption levels vary a lot.

This repo keeps the map practical:

  • Know what a file is for. Each entry names the convention, usual filename, primary readers, and spec or source.
  • Study real examples. Examples are fetched from public repositories by script, with provenance kept at the top of each file.
  • Separate practice from proposal. Maturity labels show what is widely used, what is early, and what is still only proposed.

Contents

What counts

This list is intentionally narrow. A file belongs here when it is a convention for agent behavior or agent-readable metadata: instructions, memory, skills, rules, tool config, prompt assets, or web-discovery hints.

Any file type can qualify - .md, .txt, .prompty, .json, dotfiles, or a directory pattern. Human-first project docs such as README.md, CONTRIBUTING.md, SECURITY.md, and CHANGELOG.md stay out unless the file has become an agent convention in its own right.

Maturity tiers

The badge is a claim about adoption, not quality. It keeps a proven convention from being presented the same way as a new idea.

BadgeTierMeaning
๐ŸŸขAdoptedUsed in production by multiple tools, projects, or teams.
๐ŸŸ EmergingPublished by a real organization, but still early or limited in adoption.
๐Ÿ”ตProposedPublicly described, but without clear adoption beyond the proposal.

Instruction & context

Standalone page: categories/instruction-context.md

ConventionFilesRead bySpec
๐ŸŸขAGENTS.mdAGENTS.mdMost coding agents - OpenAI Codex, Cursor, Jules, Aider, Gemini CLI, Zed, and othersspec โ†—
๐ŸŸขCLAUDE.mdCLAUDE.mdClaude Code, and tools that read the Claude memory conventionspec โ†—
๐ŸŸขTool-specific instruction filesGEMINI.md AGENT.md QWEN.md WARP.md CONVENTIONS.md copilot-instructions.mdEach file is read by its namesake tool - Gemini CLI, Amp, Qwen Code, Warp, Aider, GitHub Copilot - often alongside or as a bridge to AGENTS.mdspec โ†—
๐ŸŸ OKF (Open Knowledge Format).mdAgents over MCP (okfy, openknowledge, superops okf CLIs); Google's knowledge-catalog ingests bundlesspec โ†—
  • AGENTS.md - A plain-Markdown "README for agents" - build/test commands, conventions, and gotchas an agent needs before touching the code. The most widely adopted cross-tool instruction file.
  • CLAUDE.md - Anthropic's memory file for Claude Code - loaded automatically at session start to carry project commands, style rules, and standing instructions across turns.
  • Tool-specific instruction files - Per-tool instruction files that predate or coexist with AGENTS.md. Some tools now default to AGENTS.md while keeping legacy filenames alive, so these variants still matter when auditing real repositories.
  • OKF (Open Knowledge Format) - A machine-first organizational knowledge base: a version-controlled folder of typed Markdown files (one concept per file) that any agent reads as ground-truth context. Open-sourced by Google Cloud in 2026 as the content layer to MCP's transport.

Memory & state

Standalone page: categories/memory-state.md

ConventionFilesRead bySpec
๐ŸŸขMEMORY.mdMEMORY.mdClaude Code's auto-memory - the per-project MEMORY.md index it writes and re-reads each sessionspec โ†—
๐ŸŸขMemory Bankprojectbrief.md productContext.md activeContext.md systemPatterns.md techContext.md progress.mdCline, Roo Code, and Cursor (via the Memory Bank custom-instructions pattern)spec โ†—
  • MEMORY.md - A persistent, agent-maintained index of durable facts - written and re-read across sessions so an agent accumulates project memory instead of relearning each time.
  • Memory Bank - Cline's structured memory system - a set of Markdown files an agent reads at the start of every task to reconstruct full project context after its session memory resets. The six files shown are Cline's set; tools like Roo Code use an overlapping but different variant.

Spec-driven development

Standalone page: categories/spec-driven-development.md

ConventionFilesRead bySpec
๐ŸŸขSpec Kitconstitution.md spec.md plan.md tasks.mdGitHub Spec Kit's slash-command agents (Copilot, Claude, Gemini, Cursor, and more)spec โ†—
๐ŸŸขKiro steering filesproduct.md structure.md tech.mdAWS Kiro (steering files are largely Kiro-specific)spec โ†—
  • Spec Kit - GitHub's spec-driven workflow - a constitution plus per-feature spec โ†’ plan โ†’ tasks files that drive an agent through structured, reviewable implementation.
  • Kiro steering files - Kiro's always-on steering docs - product, structure, and tech files that give the agent persistent project context outside of any single spec.

Skills & prompt assets

Standalone page: categories/skills-prompt-assets.md

ConventionFilesRead bySpec
๐ŸŸขSKILL.mdSKILL.mdClaude Agent Skills, Claude Code, Amp, Agent Skills-compatible toolsspec โ†—
๐ŸŸขPrompt asset files.prompty .prompt system_prompt.txtPrompty tooling, Azure AI / Semantic Kernel, and apps that load externalized promptsspec โ†—
๐ŸŸขClaude Code commands.mdClaude Code - project .claude/commands/ and user ~/.claude/commands/spec โ†—
๐ŸŸขCopilot prompt & instruction files.prompt.md .instructions.mdGitHub Copilot in VS Code / Copilot CLIspec โ†—
  • SKILL.md - A self-contained, model-invoked capability file that tells an agent when to load a reusable procedure and how to execute it.
  • Prompt asset files - Externalized prompt files - Prompty's YAML-front-mattered .prompty, plain .prompt templates, and system_prompt.txt - that pull the prompt out of source code so it can be versioned and edited on its own. Only .prompty has a formal spec (prompty.ai); .prompt and system_prompt.txt are ad-hoc externalized-prompt filenames.
  • Claude Code commands - A Markdown file Claude Code exposes as a /slash-command - a reusable, version-controlled prompt workflow, with optional frontmatter (allowed-tools, model, argument-hint) and $ARGUMENTS and shell placeholders (@file references are a general Claude Code prompt feature, not command-specific). Now converging with Agent Skills, but still widely committed in its own right.
  • Copilot prompt & instruction files - Modular, path-scoped Copilot context: *.instructions.md auto-attach to matching files via an applyTo glob, while *.prompt.md are reusable prompts you invoke by name - the granular cousins of a single .github/copilot-instructions.md.

Tooling & connections

Standalone page: categories/tooling-connections.md

ConventionFilesRead bySpec
๐ŸŸขMCP server config.mcp.jsonClaude Code, Cursor, VS Code / Copilot, and Claude Desktop - every MCP host reads the same mcpServers schema, though the filename and path differ per toolspec โ†—
  • MCP server config - A JSON file that tells an agent which Model Context Protocol servers to launch and how (command, args, env) - making a project's tool and data integrations portable, shareable, and version-controlled across every MCP-capable client.

Rules & ignore files

Standalone page: categories/rules-ignore-files.md

ConventionFilesRead bySpec
๐ŸŸขRules files.cursorrules .mdc .clinerules .clinerules/ (pattern) .windsurfrulesCursor (.cursorrules / .mdc), Cline (.clinerules/ and legacy .clinerules), Windsurf (.windsurfrules)spec โ†—
๐ŸŸขAI ignore files.aiignore .cursorignore .codeiumignore .aiexcludeJetBrains Junie (.aiignore), Cursor (.cursorignore), Codeium/Windsurf (.codeiumignore)spec โ†—
  • Rules files - Per-tool rule files that scope agent behavior - older single-file forms (.cursorrules, .clinerules, .windsurfrules) and newer directory-based, glob-scoped forms (.cursor/rules/.mdc, .clinerules/, .windsurf/rules/.md).
  • AI ignore files - gitignore-syntax files that fence an AI agent out of paths - secrets, vendored code, generated output - so they're never sent to the model as context.

Design

Standalone page: categories/design.md

ConventionFilesRead bySpec
๐ŸŸขDESIGN.mdDESIGN.mdGoogle Stitch natively; and coding agents (e.g. Claude Code) when pointed at it as design contextspec โ†—
  • DESIGN.md - A structured, machine-readable design specification - tokens, components, and layout intent - that an agent reads to generate or keep UI consistent with an established system. Open-sourced by Google Labs in 2026 as a cross-tool draft spec.

Web & discoverability

Standalone page: categories/web-discoverability.md

ConventionFilesRead bySpec
๐ŸŸขllms.txtllms.txt llms-full.txt (pattern)Docs sites publish it for LLM tools and crawlers - though no major provider has confirmed reading itspec โ†—
๐ŸŸขpricing.mdpricing.mdAgents and LLM browsers fetching a clean, parse-able pricing pagespec โ†—
  • llms.txt - A proposed-turned-widely-published standard: a root-level Markdown file giving LLMs a curated, link-rich map of a site's docs. Published across hundreds of developer-docs sites - though whether the major LLM providers actually read it remains unproven.
  • pricing.md - The Markdown twin of a pricing page - same URL with a .md suffix - so an agent gets structured plans and numbers instead of scraping marketing HTML. A concrete, shipping instance of the page.md pattern.

Agent-web trust

Standalone page: categories/agent-web-trust.md

ConventionFilesRead bySpec
๐ŸŸ auth.mdauth.mdAgents discovering how to authenticate to a service (early adopters)spec โ†—
๐Ÿ”ตai.txtai.txtAI training/data-mining crawlers that voluntarily honor AI usage preferences; crawler support is not yet reliablespec โ†—
  • auth.md - A Markdown file that tells an agent how to authenticate with a service - discovery of auth endpoints and flows. Shipped by WorkOS as a real, working convention, but adoption beyond it is still early.
  • ai.txt - A text file declaring machine-readable consent, licensing, or policy preferences for AI training and data-mining. Spawning popularized the deployed root-file pattern, and a 2026 Internet-Draft now proposes a well-known URI; adoption and crawler obedience are still thin, so it stays ๐Ÿ”ต.

Identity & protocols

Standalone page: categories/identity-protocols.md

ConventionFilesRead bySpec
๐ŸŸ Agent Cards (A2A)agent-card.json agent.json (pattern)A2A-compatible agents discovering another agent's capabilitiesspec โ†—
  • Agent Cards (A2A) - The Agent2Agent (A2A) capability card - a JSON document at a well-known path advertising an agent's skills, endpoints, and auth so other agents can discover and call it. Now a Linux Foundation project at v1.0; adoption is growing but early.

Proposed namespace

Standalone page: categories/proposed-namespace.md

ConventionFilesRead bySpec
๐Ÿ”ตThe protocols.md namespaceproof.md- (no demonstrated readers; aspirational)spec โ†—
  • The protocols.md namespace - A single maintainer's pre-registered namespace of ~74 aspirational .md "protocols" (proof.md, signature.md, reputation.md, โ€ฆ) staked as Schelling points for a future agent web. Published concept, no demonstrated adoption - see the page for the audited, honest caveats.

Maintaining examples

Example files are fetched, not invented. The extractor pulls them from public sources, stores them under conventions/<slug>/examples/<source>/<filename>, and adds a line-1 provenance comment. The examples remain under their upstream owners' licenses and terms; see THIRD_PARTY_EXAMPLES.md before reusing them.

To refresh everything:

pip install -r scripts/requirements.txt
python scripts/extract.py          # fetch real files + rebuild each convention's README
python scripts/build_readme.py     # rebuild this README from scripts/targets.json

Re-running is idempotent. A missing target prints a miss and is skipped. Examples are representative samples: any file over 256 KB (for example, a multi-MB llms-full.txt) is truncated with a marker pointing back to the full source. scripts/targets.json remains the source of truth for conventions that have not been migrated yet; the skill-md pilot uses local convention metadata instead. Edit the relevant source and re-run both scripts.

Shortcut targets are available in the Makefile:

make verify          # schema + generated files + example provenance + links
make extract         # refetch public examples and rebuild generated docs
make license-report  # summarize upstream licenses for vendored examples

CI keeps the generated files and links honest. The verify workflow checks that generated docs match catalog metadata and migrated local metadata, and that every spec, example, and instance URL still resolves on each pull request and weekly. Run the same link check locally with python scripts/check_links.py.

Contributing

Read CONTRIBUTING.md. In short: an entry must pass the filter above and carry evidence for its maturity tier. Add sources to scripts/targets.json for non-migrated conventions, run the scripts, and open a PR. The skill-md pilot uses local convention metadata instead. Do not hand-write example files.

Before proposing adjacent standards, check WATCHLIST.md. Project direction lives in ROADMAP.md.

License

The curation, scripts, and original prose in this repository are MIT. Vendored example files remain under their upstream owners' licenses and terms; see THIRD_PARTY_EXAMPLES.md.

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged โ€” not that the artifact is safe.

Versions

  • git-70c76a19c4452026-08-04