Integrating AI Agents
This tutorial will help you quickly get started with NEXTDEVKIT and AI IDE usage, including AI Rules and MCP installation and usage.
In today's era, templates combined with AI can greatly improve development efficiency.
For current AI, building a complete, easily extensible, and stable SaaS project from scratch is quite difficult, because AI is not good at code abstraction and organization, and lacks awareness of project architecture.
So most projects that start completely from scratch using AI for Vibe Coding will encounter fragile code architecture and difficult to maintain code issues at a certain stage. Many bugs, very scattered code, making it difficult to continue using AI for Vibe Coding.
But if AI is based on a project that already has a well-organized structure, clear code organization, clear instructions on how to continue writing code, and complete documentation support, then using AI for Vibe Coding is definitely twice as effective with half the effort.
NextDevKit can integrate with most modern AI development tools through the Ruler project, including AI IDEs like Cursor and Copilot, and also supports AI CLI tools like Claude Code and Gemini.
NextDevKit has complete documentation and already includes Context7 AI agents by default. You can access the latest documentation directly through MCP. It also has built-in AI Rules instructions that make it easy to quickly add development features.
Choosing an AI IDE
There are many AI IDEs available, such as Cursor, Copilot, Gemini, AugmentCode, Claude Code, etc.
NextDevKit uses the Ruler project to manage AI IDE settings to work with different AI IDEs.
For the Ruler project, please check the Ruler Official Documentation.
So currently, using AI Agents supported by the Ruler project will give you a better experience. If your current AI IDE is not in the Ruler project's supported list, you can manually add the Rules and MCP settings to your project.
AI Rules Instructions
NextDevKit includes built-in AI Rules instructions to help you develop faster and use AI tools better for quick development feature integration.
.ruler/
├── engineering
│ ├── common-commands.md
│ ├── core-files-and-functions.md
│ └── development-guidelines.md
├── instructions.md
├── project
│ └── project-architecture.mdInstallation
To add these rules to your AI IDE, you first need to install Ruler globally:
pnpm install -g @intellectronica/rulerQuick Start
Apply the built-in rules to your AI agents, for example if you use Cursor, then run:
# Apply to specific agents only, for example Cursor
ruler apply --agents cursorFor more information, you can check the Ruler Official Documentation.
Pre-configured Rules
NextDevKit includes 4 core instruction files:
- 🏗️ Project Structure - Complete project structure and tech stack
- 🛠️ Development Standards - Programming standards and best practices
- 🔧 Core Functions - Key file locations and function references
- ⚡ Common Commands - Development commands and deployment process
Suggestions
AI rules are not the more the better. More rules might make the large model hallucinate more, which doesn't help much with actual development. Try to add only rules related to your needs to your prompt.
NextDevKit currently has four default rules files integrated, all written based on NextDevKit project structure and features. You can use them as reference for your own rule instructions.
If you don't want to use the default rules files, you can manually add the corresponding Rules and MCP configurations to your project.
I strongly recommend that if you want to use the default rule instructions, you should carefully read the instruction content and adjust it based on your actual needs.
For example, the core functions instruction file is shown below. You can use it as reference for your own rule instructions.
The above file is a reference. In different templates, such as the Cloudflare Workers template, there will be some specific changes and optimizations.
Reasonable instruction rule sets plus clear prompts can definitely greatly improve development efficiency.
AI + Docs
Besides AI rule instruction sets, NextDevKit also provides comprehensive and complete documentation. AI agents can access these documents through Context7 MCP integration. This ensures AI always has the latest project information.
And NextDevKit's documentation provides llms.txt file support, which can be better accessed by AI agents and crawlers.
Advantages:
- Always access the latest documentation
- Contextualized responses for NextDevKit
- No need to manually search and @ related documentation
If you need more documentation index support, you can also retrieve more documentation through Context7's MCP.
For example, Better Auth, Drizzle ORM, Shadcn UI documentation, etc.
About how to use it, you just need to simply tell AI the following instruction:
Help me query NEXTDEVKIT documentation through Context7, then xxxxAI + MCP
My personal experience is that a large amount of MCP integration doesn't have much effective impact on development efficiency. It's recommended to only integrate the MCP servers you need.
Configuring Context7
Configuring Context7 is very simple. You just need to follow the official GitHub documentation.
https://github.com/upstash/context7
Usage
After configuration, ask AI questions like:
- "Query NextDevKit authentication configuration in Context7?"
AI will automatically query NextDevKit documentation through Context7.
Summary
Great! At this step, you have completed the integration of AI Agents and can start using AI for Vibe Coding.
Next, you will understand the structure and organization of NextDevKit code, and start your service locally!