Analyze the codebase at {path} and generate a comprehensive AGENTS.md file.

Your task is to create a structured markdown document that helps AI coding agents understand this codebase.

**Step 1: Project Discovery**
- Use list_files to find README files, package.json, requirements.txt, pyproject.toml, setup.py, etc.
- Use read_file to read the main documentation and configuration files
- Identify the project type (Python, JavaScript, etc.) and tech stack

**Step 2: Structure Analysis**
- Use list_files with patterns like "**/*.py", "**/*.js", "src/**/*" to understand directory structure
- Identify main entry points (main.py, index.js, cli.py, etc.)
- Map out key directories (src/, tests/, docs/, etc.)

**Step 3: Dependencies & Build**
- Read package.json, requirements.txt, pyproject.toml to understand dependencies
- Note build commands, test commands, and development workflows
- Identify key tools (pytest, npm, docker, etc.)

**Step 4: Code Organization**
- Use search to find class definitions, function patterns
- Identify architectural patterns (MVC, microservices, etc.)
- Note key modules and their responsibilities

**Step 5: Generate AGENTS.md**
Create a markdown document with these sections:
```markdown
# Repository Guidelines

## Project Structure & Module Organization
[Concise overview of directory layout and module purposes]

## Build, Test, and Development Commands
- Installation commands
- Running the application
- Testing commands
- Linting/formatting commands

## Coding Style & Naming Conventions
[Language-specific conventions, imports, naming patterns]

## Testing Guidelines
[How tests are organized, how to run them, coverage expectations]

## Commit & Pull Request Guidelines
[Commit message format, PR requirements]

## Agent-Specific Tips
[Important patterns, gotchas, configuration locations]
```

Use write_file to save the content to "{path}/AGENTS.md"

IMPORTANT:
- Use the tools efficiently - don't read every file, sample key ones
- Focus on information that helps agents work with the code
- Keep it concise but comprehensive
- Use concrete examples where helpful
