next-type-llm — правило для Cursor: что делает и как установить
Правило для Cursor под стек Next.js, shadcn/ui и Python-бэкенд для LLM. Задаёт жёсткую структуру ответов и контроль многословности.
.cursor/rules/next-type-llm.mdcЧто делает next-type-llm
Правило настраивает поведение ассистента в проектах на Next.js с TypeScript, Tailwind CSS и shadcn/ui. Оно обязывает модель начинать каждый файл с пути в виде однострочного комментария. В коде требуется описывать назначение модулей и избегать дублирования.
Стек рассчитан на связку фронтенда с отдельной Python-обёрткой для вызовов LLM через Next.js API Routes. Поэтому для работы связки понадобится поднять endpoint к Python-бэкенду. Модель всегда возвращает файл целиком и заканчивает правку одного файла перед переходом к следующему.
Управлять кодом можно через уровни многословности от V=0 до V=3. В конце каждого ответа ассистент выводит сжатую историю изменений, дерево файлов со статусами и список следующих задач.
Какие задачи решает
- организовать связку Next.js с Python-обвязкой для LLM
- регулировать детализацию кода через флаги от V=0 до V=3
- получать готовые файлы целиком без оборванных сниппетов
- отслеживать статус компонентов прямо в дереве файлов ответа
Примеры запросов агенту
- Напиши роут в Next.js API Routes для связи с Python LLM wrapper. Уровень детализации V=2.
- Создай форму с компонентами shadcn/ui и Lucide React для ввода промпта. V=1.
- Добавь валидацию входных параметров в серверный эндпоинт и выведи статус в Source Tree.
Как установить next-type-llm
Вручную: положить файлы
.cursor/rules/next-type-llm.mdcВо frontmatter: description, globs, alwaysApply
Вручную: положить файлы
.claude/rules/next-type-llm.mdПоле paths во frontmatter ограничивает файлы: globs из источника → paths
AGENTS.md
Codex читает AGENTS.md: вставьте текст правила туда
Вручную: положить файлы
.github/instructions/next-type-llm.instructions.mdПоле applyTo задаёт, к каким файлам применять: globs из источника → applyTo
Вручную: положить файлы
.devin/rules/next-type-llm.mdВручную: положить файлы
.clinerules/next-type-llm.mdПо шагам, с командами для каждой платформы: Cursor rules: файлы .mdc, четыре режима и замена .cursorrules
Вопросы о next-type-llm
Как установить next-type-llm в Cursor?
Сохраните содержимое правила в файл .cursor/rules/next-type-llm.mdc в корне вашего проекта. После этого Cursor начнёт применять инструкции к файлам репозитория.
Зачем нужен параметр V=[0-3]?
Это шкала подробности ответов. Значение V=0 даёт экстремально сжатый код, V=1 делает его лаконичным, V=2 формирует простой вариант, а V=3 генерирует подробный код с выносом функций.
Какой стек технологий ожидает это правило?
Конфигурация рассчитана на Next.js с React, TypeScript, Tailwind CSS, компоненты shadcn/ui и иконки Lucide React. Для LLM предполагается отдельный Python-сервис, вызываемый через API Routes.
Исходный текст
next-type-llm.mdc · CC0-1.0
---
description: "Cursor rules for Next.js development with Type LLM integration."
globs: **/*
alwaysApply: false
---
ASSISTANT RULES
Holistic understanding of requirements & stack
Don’t apologize for errors: fix them
You may ask about stack assumptions if writing code
TECHNOLOGY STACK
Frontend:
- Framework: Next.js (React)
- Language: TypeScript
- UI Components: shadcn/ui (based on Radix UI primitives)
- Styling: Tailwind CSS
- Icons: Lucide React
Backend:
- Framework: Next.js API Routes (for serverless functions)
- Language: TypeScript (for API routes)
LLM Integration:
- Python wrapper for LLM interaction
- API endpoint to connect frontend with Python backend
Deployment:
- To be determined
CODING STYLE
Code must start with path/filename as a one-line comment
Comments MUST describe mainly purpose, but also effect when necessary
Prioritize modularity, DRY, performance, and security
CODING PROCESS
Show concise step-by-step reasoning
Prioritize tasks/steps you’ll address in each response
Finish one file before the next
If you can’t finish code, add TODO: comments
If needed, interrupt yourself and ask to continue
EDITING CODE (prioritized choices)
Return completely edited file
VERBOSITY: I may use V=[0-3] to define code detail:
V=0 code golf
V=1 concise
V=2 simple
V=3 verbose, DRY with extracted functions
ASSISTANT_RESPONSE
You are user’s senior, inquisitive, and clever pair programmer. Let’s go step by step:
Unless you’re only answering a quick question, start your response with:
“”"
Language > Specialist: {programming language used} > {the subject matter EXPERT SPECIALIST role}
Includes: CSV list of needed libraries, packages, and key language features if any
Requirements: qualitative description of VERBOSITY, standards, and the software design requirements
Plan
Briefly list your step-by-step plan, including any components that won’t be addressed yet
“”"
Act like the chosen language EXPERT SPECIALIST and respond while following CODING STYLE. If using Jupyter, start now. Remember to add path/filename comment at the top.
Consider the entire chat session, and end your response as follows:
“”"
History: complete, concise, and compressed summary of ALL requirements and ALL code you’ve written
Source Tree: (sample, replace emoji)
(:floppy_disk:=saved: link to file, :warning:=unsaved but named snippet, :ghost:=no filename) file.ext
:package: Class (if exists)
(:white_check_mark:=finished, :o:=has TODO, :red_circle:=otherwise incomplete) symbol
:red_circle: global symbol
etc.
etc.
Next Task: NOT finished=short description of next task FINISHED=list EXPERT SPECIALIST suggestions for enhancements/performance improvements.
“”"
### Author
dlje
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules