agentleFS
pr-pmpr-pm/prpm/.cursor/rules/creating-agents-md.mdc

prpm / rules

Cursor rule122 starsChanged 9 months agoMITView on GitHub

Creating agents.md files with plain markdown format (NO frontmatter) - use when creating agents.md packages for PRPM or generating project context files

The file

We split this creating-agents-md.mdc into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Free-form content: No required structure

    line 27
  2. Distinctive:

    Plain markdown: No YAML frontmatter

    line 200
  3. Distinctive:

    Project-specific: Avoid generic advice

    line 202
  4. Distinctive:

    Strip frontmatter: - Remove all YAML headers

    line 206
  5. Distinctive:

    Focus content: - Keep only markdown

    line 207
  6. Distinctive:

    Simplify: - Remove format-specific features

    line 209

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
creating-agents-md.mdc
---
description: Creating agents.md files with plain markdown format (NO frontmatter) - use when creating agents.md packages for PRPM or generating project context files
globs: []
alwaysApply: false
---

# Creating agents.md Files

Quick reference for creating agents.md files - plain markdown project context for AI coding assistants.

**Schema**: https://github.com/pr-pm/prpm/blob/main/packages/converters/schemas/agents-md.schema.json

## Format Rules

| Requirement | Value |
|------------|-------|
| Format | Plain markdown only |
| Frontmatter | **None** (forbidden) |
| Structure | Free-form |
| File | `agents.md` in project root |

## Critical Requirements

1. **No frontmatter**: Pure markdown only (no YAML)
2. **Single file**: Typically `agents.md` in project root
3. **Plain markdown**: Standard markdown syntax
4. **Free-form content**: No required structure

## What to Include

**High Priority:**
- Project overview and purpose
- Architecture decisions and patterns
- Tech stack and dependencies
- File structure and organization
- Coding conventions
- Development workflow
- Testing approach
- Domain knowledge and business logic

**Skip:**
- General programming best practices
- Language syntax explanations
- Framework basics
- Obvious code quality rules

## Example: Full Stack App

```markdown
# TaskMaster Development Guide

## Project Overview

TaskMaster is a task management application for remote teams with real-time collaboration and offline-first architecture.

## Architecture

### Frontend
- React 18 with TypeScript
- Vite for build tooling
- Zustand for state management
- Tailwind CSS for styling

### Backend
- Node.js with Express
- PostgreSQL with Prisma ORM
- WebSocket for real-time features
- Redis for caching and pub/sub

## Coding Conventions

- Use TypeScript strict mode
- Functional components with hooks (no class components)
- Colocate tests with source files (*.test.tsx)
- Use Zod for runtime validation

## File Structure

\`\`\`
src/
  components/     # Reusable UI components
  features/       # Feature-based modules
  hooks/          # Custom React hooks
  lib/            # Utility functions
  pages/          # Route pages
\`\`\`

## Development Workflow

1. Create feature branch from `main`
2. Write tests first (TDD)
3. Implement feature
4. Run `pnpm test` and `pnpm lint`
5. Create PR with description

## Testing

- Vitest for unit tests
- Playwright for E2E tests
- 80% coverage target
- Mock external dependencies
```

## Example: API Project

```markdown
# Payment Gateway API

RESTful API for payment processing with multiple payment providers.

## Tech Stack

- Node.js 20.x
- Express
- PostgreSQL 15
- Stripe and PayPal integrations

## API Design

All endpoints follow REST:
- `GET /api/payments` - List payments
- `POST /api/payments` - Create payment
- `PUT /api/payments/:id` - Update payment

## Error Format

\`\`\`json
{
  "error": {
    "code": "PAYMENT_FAILED",
    "message": "Payment could not be processed"
  }
}
\`\`\`

## Security

- JWT authentication required
- Rate limiting: 100 req/min per IP
- Input validation with Zod
- PCI DSS compliance

## Database Conventions

- snake_case for table/column names
- UUIDs for primary keys
- Foreign keys: `{table}_id` pattern
```

## Writing Style

**Good - Concise:**
```markdown
## Testing
- Vitest for unit tests
- Playwright for E2E
- 80% coverage target
- Mock external dependencies
```

**Bad - Verbose:**
```markdown
## Testing
When you are writing tests, it's important to understand that we use Vitest
for our unit tests because it's fast and modern. For end-to-end testing...
```

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Adding YAML frontmatter | No frontmatter - plain markdown only |
| Generic best practices | Focus on project-specific patterns |
| Verbose explanations | Be concise - AI knows general concepts |
| Language tutorials | Skip basics, focus on conventions |

## File Placement

Single project:
```
project-root/
  agents.md
  src/
  package.json
```

Monorepo (multiple files possible):
```
monorepo/
  packages/
    frontend/agents.md
    backend/agents.md
```

## Best Practices

1. **Be concise**: Focus on project-specific info (AI knows general practices)
2. **Keep updated**: Review as project evolves
3. **Real examples**: Show actual code patterns
4. **Plain markdown**: No YAML frontmatter
5. **Human-readable**: For both AI and humans
6. **Project-specific**: Avoid generic advice

## Migration from Other Formats

1. **Strip frontmatter** - Remove all YAML headers
2. **Focus content** - Keep only markdown
3. **Combine files** - Merge multiple rules into one
4. **Simplify** - Remove format-specific features
5. **Plain markdown** - Standard syntax only

## References

- **Official Spec**: https://github.com/openai/agents.md
- **Schema**: `/Users/khaliqgant/Projects/prpm/app/packages/converters/schemas/agents-md.schema.json`
- **Docs**: `/Users/khaliqgant/Projects/prpm/app/packages/converters/docs/agents-md.md`

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.