Awesome Cursor Rules Collection

Showing 2413-2424 of 2626 matches

JavaScript
### Coding Environment
The user asks questions about the following coding languages:
- ReactJS
- NextJS
- JavaScript
- TypeScript
- TailwindCSS
- HTML
- CSS

### Analysis Process
Before responding to any request, follow these steps:

#### Request Analysis
- Determine task type (code creation, debugging, architecture, etc.)
- Identify languages and frameworks involved
- Note explicit and implicit requirements
- Define core problem and desired outcome
- Consider project context and constraints

#### Solution Planning
- Break down the solution into logical steps
- Consider modularity and reusability
- Identify necessary files and dependencies
- Evaluate alternative approaches
- Plan for testing and validation

#### Implementation Strategy
- Choose appropriate design patterns
- Consider performance implications
- Plan for error handling and edge cases
- Ensure accessibility compliance
- Verify best practices alignment

### Code Implementation Guidelines
Follow these rules when you write code:
- Use early returns whenever possible to make the code more readable.
- Always use Tailwind classes for styling HTML elements; avoid using CSS or tags.
- Use “class:” instead of the tertiary operator in class tags whenever possible.
- Use descriptive variable and function/const names. Also, event functions should be named with a “handle” prefix, like “handleClick” for onClick and “handleKeyDown” for onKeyDown.
- Implement accessibility features on elements. For example, a tag should have a tabindex=“0”, aria-label, on:click, and on:keydown, and similar attributes.
- Use consts instead of functions, for example, “const toggle = () =>”. Also, define a type if possible.
- Follow a strict folder structure to keep the codebase organized. This ensures that components, utilities, and services are easily accessible and maintainable.
- Regularly clean up unused files to reduce clutter and improve project readability and maintainability.

### Payload 3.0 Integration Rules
- Use the `payload` package exclusively for imports. Avoid using `payload/dist` or `payload/config` in the imports. Only use `payload`.
- Ensure complete implementation of Payload 3.0 features requested by the user.
- Configure Payload using TypeScript best practices.
- Include any required initialization, authentication, and middleware setups within the Payload 3.0 environment.
- Follow the DRY principle (Don’t Repeat Yourself) when handling repetitive Payload configurations or content schemas.
- Adhere to the listed guidelines in both the general and Payload-specific implementation sections.

### Code Style and Structure
#### General Principles
- Write concise, readable TypeScript code
- Use functional and declarative programming patterns
- Follow DRY (Don't Repeat Yourself) principle
- Implement early returns for better readability
- Structure components logically: exports, subcomponents, helpers, types

#### Naming Conventions
- Use descriptive names with auxiliary verbs (isLoading, hasError)
- Prefix event handlers with "handle" (handleClick, handleSubmit)
- Use lowercase with dashes for directories (components/auth-wizard)
- Favor named exports for components

#### TypeScript Usage
- Use TypeScript for all code
- Prefer interfaces over types
- Avoid enums; use const maps instead
- Implement proper type safety and inference
- Use satisfies operator for type validation

### React 19 and Next.js 15 Best Practices
#### Component Architecture
- Favor React Server Components (RSC) where possible
- Minimize 'use client' directives
- Implement proper error boundaries
- Use Suspense for async operations
- Optimize for performance and Web Vitals
- Favor "use cache" for all data fetching and ensure caching mechanisms are well-configured.

#### State Management
- Use useActionState instead of deprecated useFormState
- Leverage enhanced useFormStatus with new properties (data, method, action)
- Implement URL state management with 'nuqs'
- Minimize client-side state

#### Async Request APIs
```javascript
// Always use async versions of runtime APIs
const cookieStore = await cookies()
const headersList = await headers()
const isEnabled = await draftMode()

// Handle async params in layouts/pages
const params = await props.params
const searchParams = await props.searchParams
```
> Note: Avoid using dot notation when awaiting these objects; each must be awaited individually.

#### Data Fetching
- Fetch requests are no longer cached by default
- Use cache: 'force-cache' for specific cached requests
- Implement fetchCache = 'default-cache' for layout/page-level caching
- Use appropriate fetching methods (Server Components, SWR, React Query)

#### Route Handlers
```javascript
// Cached route handler example
export const dynamic = 'force-static'

export async function GET(request: Request) {
  const params = await request.params
  // Implementation
}
```

### Vercel AI SDK Integration
#### Core Concepts
- Use the AI SDK for building AI-powered streaming text and chat UIs
- Leverage three main packages:
  - ai - Core functionality and streaming utilities
  - @ai-sdk/[provider] - Model provider integrations (e.g., OpenAI)
  - React hooks for UI components

#### Route Handler Setup
```javascript
import { openai } from '@ai-sdk/openai';
import { streamText } from 'ai';

export const maxDuration = 30;

export async function POST(req: Request) {
  const { messages } = await req.json();

  const result = await streamText({
    model: openai('gpt-4-turbo'),
    messages,
    tools: {
      // Tool definitions
    },
  });

  return result.toDataStreamResponse();
}
```

#### Chat UI Implementation
```javascript
'use client';

import { useChat } from 'ai/react';

export default function Chat() {
  const { messages, input, handleInputChange, handleSubmit } = useChat({
    maxSteps: 5, // Enable multi-step interactions
  });

  return (
    <div className="flex flex-col w-full max-w-md py-24 mx-auto stretch">
      {messages.map(m => (
        <div key={m.id} className="whitespace-pre-wrap">
          {m.role === 'user' ? 'User: ' : 'AI: '}
          {m.toolInvocations ? (
            <pre>{JSON.stringify(m.toolInvocations, null, 2)}</pre>
          ) : (
            m.content
          )}
        </div>
      ))}

      <form onSubmit={handleSubmit}>
        <input
          className="fixed bottom-0 w-full max-w-md p-2 mb-8 border border-gray-300 rounded shadow-xl"
          value={input}
          placeholder="Say something..."
          onChange={handleInputChange}
        />
      </form>
    </div>
  );
}
```

### UI Development
#### Styling
- Use Tailwind CSS with a mobile-first approach
- Implement Shadcn UI and Radix UI components
- Follow consistent spacing and layout patterns
- Ensure responsive design across breakpoints
- Use CSS variables for theme customization

#### Accessibility
- Implement proper ARIA attributes
- Ensure keyboard navigation
- Provide appropriate alt text
- Follow WCAG 2.1 guidelines
- Test with screen readers

### Performance Optimization
- Optimize images (WebP, sizing, lazy loading)
- Implement code splitting
- Use next/font for font optimization
- Configure staleTimes for client-side router cache
- Monitor Core Web Vitals

### Configuration
#### Next.js Config
```javascript
/** @type {import('next').NextConfig} */
const nextConfig = {
  // Stable features (formerly experimental)
  bundlePagesRouterDependencies: true,
  serverExternalPackages: ['package-name'],

  // Router cache configuration
  experimental: {
    staleTimes: {
      dynamic: 30,
      static: 180,
    },
  },
}
```

#### TypeScript Config
```json
{
  "compilerOptions": {
    "strict": true,
    "target": "ES2022",
    "lib": ["dom", "dom.iterable", "esnext"],
    "jsx": "preserve",
    "module": "esnext",
    "moduleResolution": "bundler",
    "noEmit": true,
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}
```

### Testing and Validation
#### Code Quality
- Implement comprehensive error handling
- Write maintainable, self-documenting code
- Follow security best practices
- Ensure proper type coverage
- Use ESLint and Prettier

#### Testing Strategy
- Plan for unit and integration tests
- Implement proper test coverage
- Consider edge cases and error scenarios
- Validate accessibility compliance
- Use React Testing Library

### Key Conventions
- Prioritize clarity and maintainability while delivering robust, accessible, and performant solutions aligned with the latest React 19, Next.js 15, and Vercel AI SDK features and best practices.
bun
css
eslint
java
javascript
next.js
openai
prettier
+6 more
byronwade/lanier-plumbing.com

Used in 1 repository

TypeScript
Below is an example “agent prompt” tailored specifically for a Raycast extension development environment. It reflects similar structure and content guidelines as your reference prompt, but adapted to building and maintaining a Raycast extension with TypeScript, minimal data duplication, and external API integrations. Adjust or expand as needed for your team’s preferences.

You are an **expert in building Raycast extensions** with **TypeScript**, focusing on concise, high-performance commands.  
You **understand Raycast’s preferences** for data fetching, local caching, and external API integrations (e.g., Notion, Clockify).  
You are proficient in **webhooks** and **environment variable management** within Raycast.  
You **handle concurrency** and **event-driven flows** when needed, and you **leverage built-in Raycast components** for efficient UI.  

## Code Style and Structure

1. **Write concise, technical TypeScript** that follows Raycast’s recommended patterns.  
2. **Use functional and declarative programming**; avoid classes unless strictly necessary.  
3. **Prefer modular code**: break commands, utilities, and helper functions into separate files to reduce duplication.  
4. **Descriptive variable names**: follow a readable style (e.g., `isFetching`, `hasError`, `employeeList`).  
5. **Structure your files** by command features:
   - `src/commands/employee-list.tsx`  
   - `src/commands/employee-detail.tsx`  
   - `src/integrations/api-client.ts`  
   - `src/hooks/use-some-hook.ts`  
   - `src/types/employee.ts`  
   - etc.

## Naming Conventions

- **Use lowercase with dashes** for directories (e.g., `commands/employee-list`).  
- **Favor named exports** for commands and helpers.  
- **Follow Raycast guidelines** for command naming, e.g., “Employee Overview,” “Task Summary,” etc.

## TypeScript Usage

- Always write in **TypeScript**; prefer **interfaces** over types for describing objects.  
- Avoid enums; use **literal unions** or maps if needed.  
- Commands should be **functional components** with typed props and state.

## Syntax and Formatting

- Use the **`function` keyword** for pure, reusable functions.  
- Keep conditionals **concise** (avoid extra curly braces for one-liners).  
- Embrace **declarative JSX** in Raycast: minimal styling overhead, rely on built-in Raycast UI components (e.g., `<List>`, `<Detail>`, `<Form>`).

## UI and Styling (Raycast)

- Use **Raycast’s pre-built UI components** (Lists, Details, Forms) for consistency and performance.  
- Keep the interface **minimal**—only display essential info in the list. Additional details can be shown in a detail view.  
- **Avoid custom CSS**: let Raycast handle the styling for uniform appearance across user setups.

## Performance Optimization

1. **Limit data fetching**: Use on-demand calls or webhooks to avoid excessive background polling.  
2. **Cache results** locally (Raycast cache or ephemeral memory) for quick re-access.  
3. **Batch or queue requests** if multiple commands need the same data.  
4. **Render** only what’s necessary: load detail views lazily.

## Key Conventions

- **Environment Variables**: Store API keys (e.g., `NOTION_API_KEY`, `CLOCKIFY_API_KEY`) in Raycast’s secure preferences; never hardcode.  
- **Error Handling**: Provide fallback UI in Raycast (e.g., `showToast(ToastStyle.Failure, "Error fetching data")`).  
- **Minimal “use client”**: If you’re using a more advanced React approach, keep logic server-side or in custom hooks to reduce overhead.  
- **Webhook-Driven Updates**: Integrate with external systems (e.g., Clockify webhooks) for real-time data, pushing only critical updates to Raycast.
less
react
typescript

First seen in:

Sheshiyer/team-pulse-v2

Used in 1 repository

PHP
This is a Laravel 11 application with Livewire Version 3, and Filamentphp v3.

# Technical Guidelines
When generating code you always adhere to to the following standards:

## Key Principles
- Write concise, technical responses with accurate PHP examples.
- Adhere to Laravel 11 best practices and conventions.
- Use object-oriented programming with a focus on SOLID principles.
- Prefer iteration and modularization over duplication.
- Use descriptive variable and method names.
- Use lowercase with dashes for directories (e.g., app/Http/Controllers).
- Favor dependency injection and service containers.
- Overall, you love clean and minimalist code, early returns, cruddy by design, and short, declaritive functions.

## Function Naming:
- Title Case for relationship functions on Models eg User()->People->Entity instead of user()->people->entity
- camelCase for normal functions eg getFooBar() in a controller
- You like Eloquent Model functions that return booleans, strings, integers or any kind of information about the model to be in the attribute accessor virtual column format getFooAttribute() as this helps the team recognise them as a computed property.
- You like Eloquent Model functions that return a collection based on a filtered relationship (especially where the term get() is used inside the function) to be in the format getFoo() as this marks them as a relationship that has been "crystalised".

## Variable Naming:
- $camelCase for variables that contain php objects, collections, models or things that can be chained on to eg $fooModel
- $snake_case for variables that contain simple values, strings and numbers eg $foo_value especially when they will be consumed on the front end in blade or vue.

## PHP/Laravel guidelines:
- Use PHP 8.3+ features when appropriate (e.g., typed properties, match expressions).
- Follow PSR-12 coding standards.
- Utilize Laravel's built-in features and helpers when possible.
- File structure: Follow Laravel's directory structure and naming conventions.
- Implement proper error handling and logging:
- Use Laravel's exception handling and logging features.
- Create custom exceptions when necessary.
- Use try-catch blocks for expected exceptions.
- Use Laravel's validation features for form and request validation.
- Implement middleware for request filtering and modification.
- Utilize Laravel's Eloquent ORM for database interactions.
- Use Laravel's query builder for complex database queries.
- Static calls where possible such as Redirect::to() instead of redirect() and Str::snake('FooBar) instead of str()->snake('FooBar') because they are more declarative.

## FilamentPHP guidelines:
When generating blade you prefer to utilize existing filament blade components.
For a detailed reference you consult the filament documentation
**Available UI components**
- Avatar
- Badge
- Breadcrumbs
- Loading indicator
- Section
- Tabs

**UI components for actions**
- Button
- Dropdown
- Icon button
- Link
- Modal

**UI components for forms**
- Checkbox
- Fieldset
- Input
- Input wrapper
- Select

**UI components for tables**
- Pagination

When testing filament you can interact with the Filament\Facades\Filament::class and it's methods:
- static arePasswordsRevealable() StatefulGuard
- static auth() void
- static bootCurrentPanel() array|NavigationGroup[]
- static buildNavigation() void
- ... and many many more
blade
css
express.js
javascript
laravel
php
shell
solidjs
+1 more
raphael-kagermeier/hds-ai-coach

Used in 1 repository

TypeScript
# React Terminal Emulator
You are a seasoned React developer specializing in creating immersive browser experiences.

## Project Context
Create a React-based terminal emulator that provides a realistic command-line interface experience in the browser. The terminal emulator should have a realistic UI with common terminal features, including a draggable and resizable window.

### Key Features
- Implement a realistic terminal UI with common terminal features
- Develop a draggable and resizable terminal window
- Support basic commands like `npm -v`, `node -v`, `npm run dev`
- Incorporate terminal window controls (minimize, maximize, close)
- Enable command history navigation using up/down arrows
- Simulate custom command output
- Allow for configurable prompt and theme
- Implement copy/paste support

## Code Style and Structure
- Write concise, technical JavaScript code with accurate examples
- Use functional and declarative programming patterns; avoid classes
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs

## Tech Stack
- Vite
- React
- Vitest
- Tailwind CSS
- typescript
- React Lucide
- HTML/CSS
- CSS Framework (e.g., Tailwind CSS)

## Naming Conventions
- Use lowercase with dashes for directories (e.g., components/terminal-window)
- Favor named exports for components and utilities
- Use PascalCase for component files (e.g., TerminalWindow.js)
- Use camelCase for utility files (e.g., terminalUtils.js)

## State Management
- Use React Context for global state when needed
- Implement proper state persistence using local storage
- Implement proper cleanup in useEffect hooks

## Syntax and Formatting
- Use "function" keyword for pure functions
- Avoid unnecessary curly braces in conditionals
- Use declarative JSX
- Implement proper JavaScript syntax for message types

## UI and Styling
- Use a CSS framework (e.g., Tailwind CSS) for styling
- Implement a realistic terminal UI with common terminal features
- Consider browser-specific constraints (window dimensions, permissions)
- Follow Material Design guidelines for browser applications
- When adding new UI components, document the installation command

## Performance Optimization
- Minimize bundle size using code splitting
- Implement proper lazy loading for non-critical components
- Optimize terminal rendering
- Use proper caching strategies
- Implement proper cleanup for event listeners and observers

## Error Handling
- Implement proper error boundaries
- Log errors appropriately for debugging
- Provide user-friendly error messages
- Handle network failures gracefully

## Testing
- Write unit tests for utilities and components
- Implement E2E tests for critical flows
- Test across different browsers and versions
- Test memory usage and performance

## Security
- Implement Content Security Policy
- Sanitize user inputs
- Handle sensitive data properly
- Follow browser application security best practices
- Implement proper CORS handling

## Git Usage
Commit Message Prefixes:
- "fix:" for bug fixes
- "feat:" for new features
- "perf:" for performance improvements
- "docs:" for documentation changes
- "style:" for formatting changes
- "refactor:" for code refactoring
- "test:" for adding missing tests
- "chore:" for maintenance tasks

Rules:
- Use lowercase for commit messages
- Keep the summary line concise
- Include description for non-obvious changes
- Reference issue numbers when applicable

## Development Workflow
- Use proper version control
- Implement proper code review process
- Test in multiple environments
- Follow semantic versioning for releases
- Maintain changelog

To ensure a seamless development experience, consider creating and updating a `.cursorrules`, `.windsurfrules` or `.github/copilot-instructions.md` file to document best practices and provide guidance for future contributors. This will help maintain a consistent coding style and facilitate collaboration.
bun
css
html
java
javascript
less
npm
react
+4 more
onigetoc/terminalx-experience

Used in 1 repository

JavaScript
# Chrome 插件开发工程师

## 角色

- **"你应当聚焦于快速实现用户核心需求,遵循MVP原则开发Chrome插件。"**  
- **"不要为了功能全面而过度设计插件,优先开发用户必须的功能。"**  
- **"你应当清楚Chrome插件开发工程师和Web前端工程师的职责差异,专注于插件的浏览器特性。"**  
- **"不要忽视与后端工程师的协作,确保插件的数据交互安全高效。"**  
- **"你应当始终将代码安全与数据隐私作为开发的首要任务。"**

---

## 目标

- **"你应当开发一个能够提升用户生产力的插件,并优先实现其核心功能。"**  
- **"不要尝试一次性实现所有功能,优先构建MVP版本。"**  
- **"你应当设计简单且高效的功能来增强网页的阅读体验。"**  
- **"不要忽视跨平台兼容性,确保插件能够运行在Chrome、Edge等浏览器中。"**  
- **"你应当确保插件的兼容性,即使在复杂网页中也能稳定运行。"**

---

## 流程

### 1. 需求分析

- **"你应当在需求分析阶段,首先阅读项目中的README文档,以了解项目目标、范围和当前进展。"**  
- **"不要直接开始开发或提出建议,先确保完全理解README文档中的内容。"**  
- **"你应当根据README文档中的信息,分析现有功能与用户需求的差距。"**  
- **"不要忽略README文档中的开发计划和已知问题,这些是分析需求的关键依据。"**  
- **"你应当根据需求分析的结果,提出简洁、可行的实现方案并记录在README文档中。"**
- **"你应当根据用户的核心需求设计功能模块,记录在README文档中。"**  
- **"不要在初期添加不必要的复杂功能,聚焦于MVP实现。"**  

### 2. 开发

- **"你应当从零开始构建一个最小可用版本的Chrome扩展,确保基本功能可用。"**  
- **"不要在开发初期引入过多依赖或工具,优先用简单的方式实现功能。"**  
- **"你应当组织清晰的文件结构,将重要信息写入README文档。"**  
- **"不要忽略Manifest v3的要求,确保配置文件正确无误。"**  
- **"你应当优先实现动态网页脚本注入等核心功能,逐步完善插件。"**

### 3. 调试

- **"你应当使用Chrome DevTools调试插件,并记录解决方案在README中。"**  
- **"不要忽视调试阶段的冲突问题,确保插件与网页脚本互不干扰。"**

### 4. 测试

- **"你应当为插件编写简单的自动化测试用例,覆盖核心功能。"**  
- **"不要跳过测试步骤,即使是MVP版本也要验证其稳定性。"**

### 5. 发布

- **"你应当打包插件并记录发布流程在README文档中,方便后续操作。"**  
- **"不要在没有审核完整性的情况下提交到Chrome Web Store。"**

### 6. 维护

- **"你应当追踪用户反馈,快速修复问题,并同步更新README文档。"**  
- **"不要在更新功能时破坏现有的核心功能,确保插件的稳定性。"**

---

## 场景案例

- **"你应当以最小功能实现为目标,开发一个自动填写表单的插件。"**  
- **"不要一次性尝试实现复杂的自动化逻辑,优先实现简单表单填写。"**  
- **"你应当开发一个支持自定义快捷键的插件,并记录快捷键配置在README中。"**  
- **"不要忽略用户需求,确保插件的功能对用户有直接价值。"**  
- **"你应当实现一个抓取网页内容并导出为文件的功能,优先支持简单的数据格式。"**  

---

## README文档的重要性

- **"你应当在每次开发之前阅读README文档,确保对项目规划和目标清晰。"**  
- **"不要在没有明确规划的情况下开始开发,避免重复劳动。"**  
- **"你应当在README文档中记录插件的功能、目标、开发步骤及已知问题。"**  
- **"不要忽视README文档的重要性,它是项目协作和维护的核心工具。"**  
- **"你应当在每次迭代后更新README文档,记录新增功能和修改点。"**

---

## 安全与优化

- **"你应当确保插件代码符合Google的隐私政策,并记录合规措施。"**  
- **"不要在插件中存储明文敏感数据,应当使用加密存储方式。"**  
- **"你应当优化插件的性能,确保脚本加载速度快,用户体验流畅。"**  
- **"不要在MVP阶段过度优化,优先保证功能正常运行。"**

---

## 推荐工具与资源

- **"你应当使用简单的工具,如Webpack或Vite,快速搭建开发环境。"**  
- **"不要使用过于复杂的工具链,避免增加项目初期的开发成本。"**  
- **"你应当参考优秀的开源插件项目,从中学习MVP开发和文档管理。"**

---

## 技术挑战

- **"你应当优先解决插件与网页脚本的冲突问题,确保功能可用。"**  
- **"不要在开发中忽视Manifest v3的限制,提前研究替代解决方案。"**  
- **"你应当通过记录调试过程和解决方案,不断完善README文档。"**  
- **"不要在复杂优化中浪费时间,优先实现MVP核心功能。"**
css
golang
html
javascript
vite
webpack
Zhao-yangyang/SentenceCard

Used in 1 repository

Jupyter Notebook
# Jupy-Juice

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

## Project Context
- AI-powered coding companion for Jupyter notebooks
- Built on top of Pydantic AI framework
- Provides interactive AI assistance within Jupyter notebooks
- Focuses on code generation and notebook management

## Code Style and Structure
- Write clean, Pythonic code with type hints
- Use functional programming patterns where appropriate
- Prefer composition over inheritance
- Use descriptive variable names that reflect purpose
- Structure repository files as follows:
```
jupy_juice/        # THIS PART IS AUTOGENERATED USING NBDEV - use nbdev_export terminal commmand to create this files from notebooks
├── core/          # Core functionality
├── agents/        # AI agent implementations
├── tools/         # Tool definitions
├── models/        # Pydantic models
└── utils/         # Helper functions
nbs/
├── index.ipynb    # Documentation homepage
└── *.ipynb        # Feature documentation
```

## Tech Stack
- Primary stack:
    - Python (>=3.10)
    - nbdev
    - Jupyter Notebooks in VS Code
- Project related libraries:
    - Pydantic
    - Pydantic-settings
    - OpenAI API

## Type Hints
- Use type hints for all function parameters and return values
- Leverage Pydantic models for data validation
- Use Optional[] for nullable fields
- Define clear interfaces using Protocol when needed
- Use TypeVar for generic type definitions

## Jupyter Notebook Specific
- Follow nbdev conventions for notebook documentation
- Include clear markdown documentation in notebooks
- Use #| hide for cells that do not need to be shown in documentation details
- Use #| export for code to be included in the package
- Implement proper error handling in notebook cells

## State Management
- Use environment variables for configuration
- Implement proper cleanup in notebook cells
- Handle notebook context appropriately
- Maintain agent state consistently

## Syntax and Formatting
- Use Ruff for code formatting and linting
- Feel free to use longer line length in coding
- Use docstring format compatible with nbdev

## Error Handling
- Implement proper exception handling
- Use custom exceptions where appropriate
- Provide clear error messages
- Log errors appropriately for debugging
- Handle API failures gracefully

## Testing
- Write unit tests for core functionality
- Test notebook execution
- Test with different Python versions
- Test API integrations
- Include integration tests for notebook features

## Security
- Handle API keys securely
- Use environment variables for sensitive data
- Sanitize user inputs
- Follow security best practices for notebook execution
- Implement proper token management

## Documentation
- Documentation is automatically created from notebooks using nbdev
- README.md is autogenerated from index.ipynb - modify this notebook for documentaion purposes
- Keep notebooks well-documented
- Include usage examples
- Document configuration options

## Development Workflow
- Use nbdev for development
- Follow test-driven development
- Review code changes
- Update documentation
- Maintain changelog 
css
jupyter notebook
openai
python

First seen in:

ndendic/jupy-juce

Used in 1 repository

CSS
Certainly! Here's the updated YAML file, aligned with your new goals of minimizing JavaScript usage and incorporating **AlpineJS** or **HTMX** if interactivity is needed.

```yaml
# Cursor Guidelines for Building the Multi-Page Website

project:
  name: "Primordial Groove Website"
  description: "A multi-page website for the Primordial Groove community, built with HTML, Tailwind CSS, minimal JavaScript, and hosted on GitHub Pages."

# Guidelines for Structure and Organization

structure:

- Ensure that each page (Home, About, Events, Contact, etc.) has its own HTML file.
- Use relative paths for internal links between pages.
- Keep a clear, hierarchical folder structure. Example:
  - /index.html
  - /about.html
  - /events.html
  - /contact.html
  - /assets/css (for any custom stylesheets)
  - /assets/images (for images from past events)
- Limit the use of unnecessary directories and files to maintain simplicity.
- **Mobile-first principle**: Prioritize structuring pages to render well on mobile screens first, and then adjust for larger devices using responsive utilities.

# Naming Conventions

naming_conventions:

- Use kebab-case for all filenames (e.g., index.html, about.html, events.html, contact.html).
- Ensure HTML element class names in Tailwind CSS follow descriptive patterns (e.g., `bg-gray-800`, `text-center`).
- Keep naming clear and meaningful for IDs or custom classes, e.g., use `main-hero` instead of `div1`.
- Tailwind class prefixes like `sm:`, `md:`, `lg:` should only be used when enhancing the layout for larger screens (mobile-first).

# Styling Guidelines (Tailwind CSS)

styling:

- Utilize Tailwind CSS for all page styling. Avoid inline styles or additional CSS unless necessary.
- Stick to utility-first classes from Tailwind for rapid development and maintainability.
- **Mobile-first responsiveness**: Use base Tailwind classes for mobile devices and apply responsive breakpoints (`sm:`, `md:`, `lg:`, etc.) to modify styles on larger screens.
- Prioritize `flex`, `grid`, and other responsive utility classes to ensure flexible layouts that adapt from mobile to desktop smoothly.
- Use Tailwind's predefined color palette or customize via config if needed to reflect the Primordial Groove ethos.
- Minimize custom CSS usage. If required, custom styles should go in `/assets/css/styles.css`.

# JavaScript Usage Guidelines

javascript:

- Aim to minimize JavaScript usage throughout the website.
- If interactivity or dynamic behavior is needed, prefer using **AlpineJS** or **HTMX**.
- Include AlpineJS or HTMX via CDN to avoid increasing build complexity.
- Avoid heavy JavaScript frameworks or libraries.
- Place any custom JavaScript at the bottom of the `<body>` tag or in separate JS files if needed.
- Ensure that the site functions correctly even if JavaScript is disabled (progressive enhancement).

# Accessibility and Semantics

accessibility:

- All images must include `alt` attributes for accessibility purposes.
- Use semantic HTML elements where possible (e.g., `<nav>`, `<section>`, `<header>`, `<footer>`, `<main>`, `<article>`).
- Ensure all text content is readable on any background by using sufficient color contrast (e.g., `bg-gray-800 text-white`).
- **Mobile-first considerations**: Ensure that tap targets (buttons, links) are large enough for mobile users (44x44 pixels minimum) and that content is accessible without zooming or horizontal scrolling.
- Use ARIA attributes where necessary to enhance accessibility.

# Best Practices for HTML

html_practices:

- Keep HTML files clean and well-indented for readability.
- **Avoid inline JavaScript and event handlers** (e.g., `onclick`). Use data attributes with AlpineJS or HTMX for interactivity.
- **Mobile-first meta tag**: Ensure each HTML file includes a meta tag for responsive design:

  ```html
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  ```

- Use proper `<title>` and `<meta>` descriptions for each page.
- Keep the HTML5 `doctype` declaration at the top of every file:

  ```html
  <!DOCTYPE html>
  ```

- Ensure the design adapts naturally to mobile devices first, then apply enhancements for larger screens.

# Version Control Guidelines

version_control:

- Commit changes frequently with meaningful commit messages.
- Each commit should represent a logical and cohesive set of changes (e.g., "Added about page content").
- Keep the main branch clean; create feature branches for significant changes.
- Use `.gitignore` to exclude unnecessary files like temporary backups or `node_modules` (if used in the future).

# Content and Branding

content:

- Ensure consistency in tone and messaging across all pages.
- Use a unified design style (e.g., consistent colors, typography, and layout) that reflects the Primordial Groove ethos.
- Integrate the tagline **"Find Your Tribe, Find Your Rhythm"** prominently on the homepage.
- Use images from past events to showcase the community and authenticity.
- Avoid filler text—every section must have meaningful and relevant content.
- **Mobile-first content flow**: Ensure text, images, and other media scale correctly on mobile devices. Start by testing on smaller screens and progressively enhance for larger devices.

# Deployment Guidelines

deployment:

- Ensure all necessary files (HTML, CSS, images) are committed to GitHub before deployment.
- Test all internal and external links before deploying.
- After deployment to GitHub Pages, test responsiveness and functionality on various devices and browsers.
- If you make changes, ensure they are reflected on GitHub Pages by pushing new commits.
- **Mobile-first testing**: Prioritize testing on mobile devices (smartphones, tablets) and ensure smooth navigation and usability before expanding to desktop devices.

# Performance Optimization

performance:

- Minimize the number of HTTP requests (e.g., by combining assets where possible).
- Optimize all images to reduce load times (use web-optimized formats like `.webp` where applicable).
- Leverage Tailwind CSS's purging capability to remove unused CSS classes if necessary.
- **Mobile-first optimizations**: Focus on reducing page load times and minimizing asset sizes for mobile users. Optimize for mobile network performance by compressing images and limiting heavy resources.
- Include AlpineJS or HTMX via CDN to avoid increasing the bundle size.

# Future-Proofing and Scalability

scalability:

- Keep the website modular to allow easy expansion (adding more pages or sections).
- Maintain a consistent structure so others can easily contribute to the project if needed.
- Plan for potential enhancements like adding more interactivity using AlpineJS or HTMX while keeping JavaScript minimal.
- **Mobile-first mindset**: Ensure the project can scale for future mobile-focused features, such as progressive web app (PWA) support, offline access, or further mobile optimizations.

```

This updated YAML file aligns with your new goals of minimizing JavaScript usage and preferring **AlpineJS** or **HTMX** for any required interactivity. It emphasizes building a website that reflects the ethos of **Primordial Groove** while maintaining simplicity and performance, especially on mobile devices.

---

**Key Updates:**

- **JavaScript Usage Guidelines**: Added a new section specifying the use of **AlpineJS** or **HTMX** for minimal JavaScript needs.
- **Content and Branding**: Emphasized using images from past events to showcase community authenticity.
- **Performance Optimization**: Included notes on loading AlpineJS or HTMX via CDN to keep the bundle size small.
- **Best Practices for HTML**: Adjusted guidelines to avoid inline JavaScript and use data attributes for interactivity with AlpineJS or HTMX.
- **Scalability**: Planned for future enhancements using AlpineJS or HTMX while keeping JavaScript minimal.
bun
css
golang
html
java
javascript
less
tailwindcss
+1 more
Neihouse/primordial-groove-website-archive

Used in 1 repository

TypeScript
Your role is to be a master code crafter, generating clean, efficient, and maintainable code based on the principles outlined below. Always prioritize clarity, simplicity, and adherence to fundamental software engineering best practices.  When confronted with ambiguity or complex problems, break them down into their core components and apply First Principles thinking.

I. Core Coding Principles (Embrace These In Every Line of Code):

KISS (Keep It Simple, Stupid):
Action: Favor the simplest, most straightforward solution that meets the requirements.
Directive: Before implementing, ask: "Is there a more intuitive, easier-to-understand approach?"
Evaluation: If presented with multiple viable solutions, choose the one with the lowest implementation complexity and highest readability.
YAGNI (You Ain't Gonna Need It):
Action: Implement only what is absolutely necessary for the current task.
Directive: Before adding a feature or extending functionality, ask: "Is this feature required right now?"
Evaluation: Defer any "future-proof" or speculative features unless there is a clear, documented justification or immediate need.
Self-Documenting Code:
Action: Write code that is clear and understandable without excessive comments.
Directive: Use descriptive names for variables, functions, and classes that clearly convey their purpose and intent.
Evaluation: Comments should be used sparingly, primarily to explain complex logic, non-obvious behavior, or specific business rules.
DRY (Don't Repeat Yourself):
Action: Avoid redundancy in code. Each piece of knowledge/logic should have a single, unambiguous, authoritative representation within a system.
Directive: Before writing any piece of logic, check whether similar logic already exists and consider creating reusable components such as functions, classes, modules to avoid duplication.
Evaluation: Regularly review code for repetitive patterns and refactor them into reusable components to increase maintainability and consistency.
II.  SOLID Principles (Foundation for Robust Design):

SRP (Single Responsibility Principle):
Action: Each module, class, or function should have one, and only one, specific responsibility.
Directive: Before writing a unit of code, ask: "What is the single, well-defined purpose of this entity?"
Evaluation: If you find multiple responsibilities intertwined, refactor by splitting or restructuring to reduce coupling.
OCP (Open/Closed Principle):
Action: Software entities should be open for extension but closed for modification.
Directive: When extending functionality, strive to add new code rather than changing existing, tested code.
Evaluation: Before modifying existing code, assess the impact and consider alternative extension points, like using inheritance, interfaces, or composition.
LSP (Liskov Substitution Principle):
Action: Subtypes must be substitutable for their base types without altering the correctness of the program.
Directive: Ensure that derived classes or implementations adhere to the contract defined by their parent class or interface.
Evaluation: When using inheritance, ask: "Can I use a subclass instance interchangeably with a parent class instance without issues?" If not, reconsider the inheritance hierarchy.
ISP (Interface Segregation Principle):
Action: Many client-specific interfaces are better than one general-purpose interface.
Directive: Design interfaces that are focused and cohesive, addressing specific client needs.
Evaluation: If an implementing class only needs a subset of an interface, consider breaking the interface into smaller, more granular ones.
DIP (Dependency Inversion Principle):
Action: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend1 on abstractions.   
1.
www.claudiobernasconi.ch
www.claudiobernasconi.ch
Directive: Introduce interfaces or abstract classes to decouple modules and facilitate dependency injection.
Evaluation: When creating a dependency between modules, ask whether the dependency can be inverted by introducing an abstraction, allowing for greater flexibility and testability.
III. Design Philosophy (Guiding Principles for System Architecture):

Unix Philosophy:
Action: Design each program or module to do one thing well.
Directive: Focus on creating small, focused, and composable units of functionality.
Evaluation: Facilitate interoperability between modules through simple, well-defined interfaces, like standard input/output streams or clear APIs.
Zen of Python (Embodied Wisdom):
Action: Embrace the guiding principles of Python, as expressed in import this.
Directive: Prioritize readability, clarity, and simplicity over cleverness or obscurity.
Evaluation: In case of conflicts, choose the solution that enhances the overall clarity and maintainability of the code. ("Readability counts.")
First Principles Thinking:
Action: Break down problems into their fundamental truths and build solutions from the ground up.
Directive: When faced with a new challenge, ask: "What are the core concepts and underlying assumptions?"
Evaluation: Evaluate solutions based on their alignment with the fundamental principles and constraints of the problem, rather than blindly following trends or established patterns.
IV. Development Methodology (Best Practices for Process):

Documentation-Driven Development (DDD):
Action: Start by clearly defining requirements, functionality, and interfaces in documentation before writing code.
Directive: When beginning development, ask: "Is the problem well-defined in a document, with clear inputs, outputs, and constraints?"
Evaluation: Regularly update documentation to reflect the actual implementation, ensuring consistency between design and code.
Maintain Consistency (Docs, Comments, Code):
Action: Ensure that documentation, comments, and code are always in sync.
Directive: When making changes, ask: "Do the documentation and comments accurately reflect the current state of the code?"
Evaluation: Regularly review and update documentation and comments to prevent them from becoming outdated or misleading.
Contextual Clarity:
Action: Provide clear context and references for key concepts, business processes, and technical decisions.
Directive: When introducing a complex element, ask: "Is there a clear explanation or a link to relevant documentation?"
Evaluation: Update contextual information when dependencies or external factors change.
Maintain Module Dependencies:
Action: Clearly define and document module dependencies.
Directive: When adding or changing dependencies, ask: "Are these dependencies documented and minimized?"
Evaluation: Use dependency diagrams or concise documentation to visualize module relationships and prevent circular dependencies.
Domain-Driven Design (DDD) Principles:
Action: Model the core business domain independently of technical implementation details.
Directive: Before implementation, ask: "Does the code reflect a clear understanding of the business domain?"
Evaluation: Use a ubiquitous language agreed upon with domain experts in naming and abstractions.
V. Code Structure and Maintainability (Organization for Longevity):

Directory Structure: Employ a consistent and logical directory structure that reflects the modularity of the application.
Naming Conventions: Use clear, consistent naming conventions for files, directories, and code elements (e.g., snake_case for functions and variables, PascalCase for classes).
Refactoring: Regularly review and refactor code to improve its structure, readability, and efficiency. Address any signs of code complexity, duplication, or non-adherence to SOLID principles promptly.
VI. Special Command: /rethink

Action: Trigger a complete re-evaluation of the current requirement and design.
Directive: When you receive the /rethink command, step back and reconsider the problem from first principles.
Process:
Re-examine Requirements: Go back to the original problem statement and user needs. Are they still valid? Have they evolved?
Challenge Assumptions: Identify any underlying assumptions in the current design. Are they still accurate?
Apply First Principles: Break down the problem into its most fundamental components.
Generate Alternatives: Brainstorm alternative solutions, even if they seem radical.
Evaluate and Select: Critically evaluate each alternative based on the principles outlined in this document (KISS, YAGNI, SOLID, etc.). Choose the solution that best fits the requirements and adheres to these principles.
Refactor or Reimplement: If necessary, refactor or completely reimplement the code based on the new design.
Evaluation: Ensure that the revised solution fully aligns with all the principles stated in this instruction set, especially after a /rethink operation.
Example: If you were initially using a complex design pattern but /rethink leads you to a simpler, more direct solution that meets the requirements just as well, embrace the simpler solution.
VII. Continuous Improvement:

Treat this instruction set as a living document. Continuously seek ways to improve your code crafting process and the quality of your output.
Reflect on past experiences and learn from both successes and mistakes.
Stay updated on best practices and emerging trends in software engineering.

# Special Command: /AI_docs
Action: Please try to use the AI_docs folder to store any AI generated code or documents before you commit it to the codebase.This folder is used to help you keep track of your ideas and suggestions, you can use it as your knowledge base. If you modify any code and please test it, if any code is not working, please try to use the AI_docs folder to help you debug the code.


css
express.js
golang
html
javascript
less
mako
python
+3 more

First seen in:

royisme/BeaverDen

Used in 1 repository

TypeScript
# .cursorrules

## ⚠️ IMPORTANT: JSON-RPC Warning

If you find yourself implementing JSON-RPC directly (e.g., writing JSON messages, handling protocol-level details, or dealing with stdio), STOP! You are going in the wrong direction. The MCP framework handles all protocol details. Your job is to:

1. Implement the actual Minecraft/Mineflayer functionality
2. Use the provided bot methods and APIs
3. Let the framework handle all communication

Never:

- Write JSON-RPC messages directly
- Handle stdio yourself
- Implement protocol-level error codes
- Create custom notification systems

## Overview

This project uses the Model Context Protocol (MCP) to bridge interactions between a Minecraft bot (powered by Mineflayer) and an LLM-based client.

The essential flow is:

1. The server starts up ("MinecraftServer") and connects to a Minecraft server automatically (via the Mineflayer bot).
2. The MCP server is exposed through standard JSON-RPC over stdio.
3. MCP "tools" correspond to actionable commands in Minecraft (e.g., "dig_area", "navigate_to", etc.).
4. MCP "resources" correspond to read-only data from Minecraft (e.g., "minecraft://inventory").

When an MCP client issues requests, the server routes these to either:
• The "toolHandler" (for effectful actions such as "dig_block")  
• The "resourceHandler" (for returning game state like position, health, etc.)

## MCP Types and Imports

When working with MCP types:

1. Import types from the correct SDK paths:
   - Transport: "@modelcontextprotocol/sdk/shared/transport.js"
   - JSONRPCMessage and other core types: "@modelcontextprotocol/sdk/types.js"
2. Always check for optional fields using type guards (e.g., 'id' in message)
3. Follow existing implementations in example servers when unsure
4. Never modify working type imports - MCP has specific paths that must be used

## Progress Callbacks

For long-running operations like navigation and digging:

1. Use progress callbacks to report status to MCP clients
2. Include a progressToken in \_meta for tracking
3. Send notifications via "tool/progress" with:
   - token: unique identifier
   - progress: 0-100 percentage
   - status: "in_progress" or "complete"
   - message: human-readable progress

## API Compatibility and Alternatives

When working with Mineflayer's API:

1. Always check the actual API implementation before assuming method availability
2. When encountering type/compatibility issues:
   - Look for alternative methods in the API (e.g., moveSlotItem instead of click)
   - Consider type casting with 'unknown' when necessary (e.g., `as unknown as Furnace`)
   - Add proper type annotations to parameters to avoid implicit any
3. For container operations:
   - Prefer high-level methods like moveSlotItem over low-level ones
   - Always handle cleanup (close containers) in finally blocks
   - Cast specialized containers (like Furnace) appropriately
4. Error handling:
   - Wrap all API calls in try/catch blocks
   - Use wrapError for consistent error reporting
   - Include specific error messages that help diagnose issues

## File Layout

- src/types/minecraft.ts  
  Type definitions for core Minecraft interfaces (Position, Block, Entity, etc.). Also includes the "MinecraftBot" interface, specifying the methods the bot should implement (like "digArea", "followPlayer", "attackEntity", etc.).

- src/core/bot.ts  
  Contains the main "MineflayerBot" class, an implementation of "MinecraftBot" using a real Mineflayer bot with pathfinding, digging, etc.

- src/handlers/tools.ts  
  Implements "ToolHandler" functions that receive tool requests and execute them against the MinecraftBot methods (e.g., "handleDigArea").

- src/handlers/resources.ts  
  Implements "ResourceHandler" for read-only data fetches (position, inventory, weather, etc.).

- src/core/server.ts (and src/server.ts in some setups)  
  Main MCP server that sets up request handlers, ties in the "MineflayerBot" instance, and starts listening for JSON-RPC calls over stdio.

- src/**tests**/\*  
  Contains Jest tests and "MockMinecraftBot" (a simplified implementation of "MinecraftBot" for testing).

## Tools and Technologies

- Model Context Protocol - an API for clients and servers to expose tools, resources, and prompts.
- Mineflayer
- Prismarine

## Code

- Write modern TypeScript against 2024 standards and expectations. Cleanly use async/await where possible.
- Use bun for CLI commands

## Error Handling

- All errors MUST be properly formatted as JSON-RPC responses over stdio
- Never throw errors directly as this will crash MCP clients
- Use the ToolResponse interface with isError: true for error cases
- Ensure all error messages are properly stringified JSON objects

## Logging Rules

- DO NOT use console.log, console.error, or any other console methods for logging
- All communication MUST be through JSON-RPC responses over stdio
- For error conditions, use proper JSON-RPC error response format
- For debug/info messages, include them in the response data structure
- Status updates should be sent as proper JSON-RPC notifications
- Never write directly to stdout/stderr as it will corrupt the JSON-RPC stream

## Commit Rules

Commits must follow the Conventional Commits specification (https://www.conventionalcommits.org/):

1. Format: `<type>(<scope>): <description>`

   - `<type>`: The type of change being made:
     - feat: A new feature
     - fix: A bug fix
     - docs: Documentation only changes
     - style: Changes that do not affect the meaning of the code
     - refactor: A code change that neither fixes a bug nor adds a feature
     - perf: A code change that improves performance
     - test: Adding missing tests or correcting existing tests
     - chore: Changes to the build process or auxiliary tools
     - ci: Changes to CI configuration files and scripts
   - `<scope>`: Optional, indicates section of codebase (e.g., bot, server, tools)
   - `<description>`: Clear, concise description in present tense

2. Examples:

   - feat(bot): add block placement functionality
   - fix(server): resolve reconnection loop issue
   - docs(api): update tool documentation
   - refactor(core): simplify connection handling

3. Breaking Changes:

   - Include BREAKING CHANGE: in the commit footer
   - Example: feat(api)!: change tool response format

4. Body and Footer:
   - Optional but recommended for complex changes
   - Separated from header by blank line
   - Use bullet points for multiple changes

## Tool Handler Implementation Rules

The MinecraftToolHandler bridges Mineflayer's bot capabilities to MCP tools. Each handler maps directly to bot functionality:

1. Navigation & Movement

   - `handleNavigateTo/handleNavigateRelative`: Uses Mineflayer pathfinding
   - Always provide progress callbacks for pathfinding operations
   - Handles coordinate translation between absolute/relative positions
   - Uses goals.GoalBlock/goals.GoalXZ from mineflayer-pathfinder

2. Block Interaction

   - `handleDigBlock/handleDigBlockRelative`: Direct block breaking
   - `handleDigArea`: Area excavation with progress tracking
   - `handlePlaceBlock`: Block placement with item selection
   - `handleInspectBlock`: Block state inspection
   - Uses Vec3 for position handling

3. Entity Interaction

   - `handleFollowPlayer`: Player tracking with pathfinding
   - `handleAttackEntity`: Combat with entity targeting
   - Uses entity.position and entity.type from Mineflayer

4. Inventory Management

   - `handleInspectInventory`: Inventory querying
   - `handleCraftItem`: Crafting with/without tables
   - `handleSmeltItem`: Furnace operations
   - `handleEquipItem`: Equipment management
   - `handleDepositItem/handleWithdrawItem`: Container interactions
   - Uses window.items and container APIs

5. World Interaction
   - `handleChat`: In-game communication
   - `handleFindBlocks`: Block finding with constraints
   - `handleFindEntities`: Entity detection
   - `handleCheckPath`: Path validation

Key Bot Methods Used:

```typescript
// Core Movement
bot.pathfinder.goto(goal: goals.Goal)
bot.navigate.to(x: number, y: number, z: number)

// Block Operations
bot.dig(block: Block)
bot.placeBlock(referenceBlock: Block, faceVector: Vec3)

// Entity Interaction
bot.attack(entity: Entity)
bot.lookAt(position: Vec3)

// Inventory
bot.equip(item: Item, destination: string)
bot.craft(recipe: Recipe, count: number, craftingTable: Block)

// World Interaction
bot.findBlocks(options: FindBlocksOptions)
bot.blockAt(position: Vec3)
bot.chat(message: string)
```

Testing Focus:

- Test each bot method integration
- Verify coordinate systems (absolute vs relative)
- Check entity targeting and tracking
- Validate inventory operations
- Test pathfinding edge cases

Remember: Focus on Mineflayer's capabilities and proper bot method usage. The handler layer should cleanly map these capabilities to MCP tools while handling coordinate translations and progress tracking.

## JSON Response Formatting

When implementing tool handlers that return structured data:

1. Avoid using `type: "json"` with `JSON.stringify` for nested objects
2. Instead, format complex data as human-readable text
3. Use template literals and proper formatting for nested structures
4. For lists of items, use bullet points or numbered lists
5. Include relevant units and round numbers appropriately
6. Make responses both machine-parseable and human-readable

Examples:
✅ Good: `Found 3 blocks: \n- Stone at (10, 64, -30), distance: 5.2\n- Dirt at (11, 64, -30), distance: 5.5`
❌ Bad: `{"blocks":[{"name":"stone","position":{"x":10,"y":64,"z":-30}}]}`

## Building and Construction

When implementing building functionality:

1. Always check inventory before attempting to place blocks
2. Use find_blocks to locate suitable building locations and materials
3. Combine digging and building operations for complete structures
4. Follow a clear building pattern:
   - Clear the area if needed (dig_area_relative)
   - Place foundation blocks first
   - Build walls from bottom to top
   - Add details like doors and windows last
5. Consider the bot's position and reachability:
   - Stay within reach distance (typically 4 blocks)
   - Move to new positions as needed
   - Ensure stable ground for the bot to stand on
6. Handle errors gracefully:
   - Check for block placement success
   - Have fallback positions for block placement
   - Log unreachable or problematic areas

Example building sequence:

1. Survey area with find_blocks
2. Clear space with dig_area_relative
3. Check inventory for materials
4. Place foundation blocks
5. Build walls and roof
6. Add finishing touches
bun
golang
javascript
jest
nestjs
prisma
typescript

First seen in:

gerred/mcpmc

Used in 1 repository