Instructions are the rules that guide agent behavior. They live in the instructions array in drevon.config.json and are injected into every agent’s config file.
{ "instructions": [ { "id": "unique-id", "title": "Human-Readable Title", "content": "The actual instruction text that agents will follow.", "alwaysApply": true, "globs": ["**/*.ts"] } ]}
Field
Required
Description
id
Yes
Unique identifier (kebab-case recommended)
title
Yes
Display title
content
Yes
The instruction text
alwaysApply
No
Whether to always apply (default: true)
globs
No
File patterns — used by Cursor for conditional rules
{ "instructions": [ { "id": "api-conventions", "title": "API Conventions", "content": "REST endpoints use kebab-case URLs. Always version APIs (/v1/). Return JSON with { data, error, meta } envelope. Use HTTP status codes correctly (201 for create, 204 for delete)." }, { "id": "database-rules", "title": "Database Rules", "content": "Use Prisma for all database access. Never write raw SQL in application code. All queries go through the repository layer. Use transactions for multi-step operations." }, { "id": "security", "title": "Security Standards", "content": "Validate all input with Zod schemas. Sanitize output to prevent XSS. Use parameterized queries (Prisma handles this). Never log sensitive data (passwords, tokens, PII)." } ]}
Glob-targeted instructions generate separate .mdc files for Cursor. Other agents receive all instructions regardless of globs, since they don’t support conditional activation.
{ "instructions": [ { "id": "memory-protocol", "title": "Memory Protocol", "content": "Read all files in .drevon/memory/ at the start of every session. Write to them after significant actions.", "alwaysApply": true }, { "id": "tech-stack", "title": "Tech Stack", "content": "Next.js 15 (App Router), TypeScript strict mode, Tailwind CSS, Prisma ORM, PostgreSQL, Vercel deployment. Use these unless explicitly told otherwise.", "alwaysApply": true }, { "id": "frontend-rules", "title": "Frontend Rules", "content": "Use server components by default. Only add 'use client' when interactivity is needed. Use next/image for all images. Keep pages thin — business logic in server actions or API routes.", "globs": ["app/**", "components/**"], "alwaysApply": false }, { "id": "backend-rules", "title": "Backend Rules", "content": "Route handlers in app/api/. Use Zod for request validation. Return consistent response shapes. Handle errors with try/catch and proper status codes.", "globs": ["app/api/**", "lib/services/**"], "alwaysApply": false } ]}