Skip to content

Commit 7c9e9a5

Browse files
committed
chore: add AGENTS.md for agentic dev work
1 parent 6ef6542 commit 7c9e9a5

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

AGENTS.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# AGENTS.md
2+
3+
## Build/Run Commands
4+
- Build: `pnpm run build` (uses tsc)
5+
- Dev mode: `pnpm run dev` (tsx watch)
6+
- Run tests: `pnpm run test` (vitest)
7+
- Run single test: `pnpm run test <test-file-pattern>`
8+
- Test watch mode: `pnpm run test:watch`
9+
- Lint: `pnpm run lint` (eslint)
10+
- Lint fix: `pnpm run lint:fix`
11+
- Typecheck: `pnpm run typecheck` (tsc --noEmit)
12+
- Format: `pnpm run format` (prettier)
13+
- Format check: `pnpm run format:check`
14+
15+
## Code Style Guidelines
16+
- Use double quotes for strings
17+
- No semicolons
18+
- Use tabs for indentation (TSConfig sets this)
19+
- Strict TypeScript with all strict flags enabled
20+
- No unused locals/parameters
21+
- Exact optional property types
22+
- No implicit returns/fallthrough cases
23+
- No unchecked indexed access
24+
- Use ESNext target and modules
25+
- Import paths use `@/*` alias for src/
26+
- Declaration files and source maps generated
27+
- Resolve JSON modules enabled
28+
29+
## Naming Conventions
30+
- Files: kebab-case
31+
- Types: PascalCase
32+
- Functions/variables: camelCase
33+
- Constants: UPPER_SNAKE_CASE
34+
- Test files: *.test.ts
35+
36+
## Error Handling
37+
- Use custom error classes from utils/errors.ts
38+
- Always provide meaningful error messages
39+
- Use logger.ts for consistent logging
40+
- Handle dry-run mode in all mutating operations
41+
42+
## Testing
43+
- Use vitest with globals
44+
- Place tests alongside source files
45+
- Use .test.ts extension
46+
- Mock filesystem with memfs where needed
47+
48+
## Development Practices
49+
- Use yarn for package management
50+
- Follow workspaces pattern with packages in `packages/{project}`
51+
- All code compatible with Cloudflare Workers runtime
52+
- Use TypeScript for all code with proper typing
53+
- Follow ES modules format
54+
- Use `async`/`await` for asynchronous code
55+
- Write tests for all functionality
56+
- Use Wrangler for deployments to Cloudflare Workers
57+
58+
## Project Structure
59+
- `packages/`: Contains all project packages
60+
- `mcp/`: Main MCP implementation for Cloudflare Workers
61+
- `test-utils/`: Utilities for testing
62+
- `examples/`: Contains example implementations
63+
- `crud-mcp/`: Example CRUD application using MCP framework
64+
- `simple-prompt-agent/`: Example agent with only a prompt for chatting
65+
- Main package: packages/mcp/src/index.ts
66+
- MCP Server implementation: packages/mcp/src/mcp/server.ts
67+
- Example application: examples/crud-mcp/src/index.ts
68+
69+
## Development Workflow
70+
1. Install dependencies at root level: `yarn install`
71+
2. Build all packages: `yarn build`
72+
3. Run tests: `yarn test`
73+
4. For specific packages, navigate to directory and use specific scripts

packages/playground/AGENTS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# AGENTS.md
2+
3+
## Build/Run Commands
4+
- Dev: `pnpm run dev` (Next.js with Turbopack)
5+
- Build: `pnpm run build` (Next.js build)
6+
- Start: `pnpm run start` (Production server)
7+
- Lint: `pnpm run lint` (Next.js ESLint)
8+
- Deploy: `pnpm run deploy` (Cloudflare Workers)
9+
- Preview: `pnpm run preview` (Cloudflare preview)
10+
- Type gen: `pnpm run cf-typegen` (Cloudflare types)
11+
12+
## Code Style Guidelines
13+
- Use double quotes for strings
14+
- No semicolons
15+
- Strict TypeScript with all strict flags
16+
- Import paths use `@/*` alias for src/
17+
- React 19 with TypeScript
18+
- Next.js 15 App Router
19+
- Tailwind CSS v4 with CSS variables
20+
- shadcn/ui components in New York style
21+
- Use lucide-react for icons
22+
- No unused locals/parameters
23+
- No implicit returns/fallthrough cases
24+
25+
## Naming Conventions
26+
- Files: kebab-case
27+
- Types: PascalCase
28+
- Functions/variables: camelCase
29+
- React components: PascalCase
30+
- Constants: UPPER_SNAKE_CASE
31+
32+
## Project Structure
33+
- `src/app/`: Next.js App Router pages
34+
- `src/components/`: React components
35+
- `src/components/ui/`: shadcn/ui components
36+
- `src/components/ai-elements/`: AI SDK components
37+
- `public/`: Static assets and avatars
38+
39+
## Key Technologies
40+
- Next.js 15 with App Router
41+
- React 19
42+
- TypeScript with strict mode
43+
- Tailwind CSS v4
44+
- Cloudflare Workers deployment
45+
- AI SDK for chat functionality
46+
- Radix UI components
47+
- Zod for validation

0 commit comments

Comments
 (0)