{"slug": "chatgpt-community-ai-questions-and-answers-curso", "title": "ChatGPT community, AI Questions and Answers, Curso", "summary": "A developer using Cursor v0.42.x eliminated repeated hallucinated import paths in a feature-sliced design project by adding a project-specific .cursorrules file that forbids imports from top-level /components or /hooks folders and requires components to live in /features/[feature-name]/ui or /shared/ui. The developer reported that the fix, discovered through a ChatGPT community thread rather than official documentation, stopped the tool from rewriting imports on every \"Apply\" and cut a 10-minute manual cleanup per fix. The account also warns that overly rigid rules can suppress useful suggestions, so constraints should be split into hard constraints, preferences, and logic rules.", "body_md": "# ChatGPT community, AI Questions and Answers, Curso\n\nHow I finally stopped [Cursor](/en/tags/cursor/) from hallucinating my project structure\n\nI spent four hours last Tuesday fighting with Cursor (v0.42.x) because it kept trying to import components from a `/components` folder that didn't exist. I’m using a feature-sliced design where everything is in `/features`, but the LLM had this obsession with standard Next.js layouts. It was rewriting my imports every single time I hit \"Apply,\" turning a 2-second fix into a 10-minute manual cleanup.\n\nThe fix wasn't a better prompt. It was a `.cursorrules` file.\n\n## Why your prompt isn't enough for project consistency\n\nMost people treat AI coding like a chat session. You tell it \"I'm using FSD,\" it says \"Got it,\" and then three prompts later, it's back to suggesting `import { Button } from '@/components/ui/button'` when my buttons are actually in `@/shared/ui`.\n\nThe bottleneck is the context window. Even with the best [RAG](/en/tags/rag/), the model occasionally drifts toward the \"average\" of its training data—which is usually the most common (and often generic) project structure on GitHub.\n\nI tried adding these instructions to my system prompt, but that's a global setting. I needed something project-specific. That's where a local rules file comes in.\n\n## Fixing the \"Wrong Path\" hallucination with .cursorrules\n\nI created a `.cursorrules` file in my root directory. I didn't write a polite request; I wrote a set of constraints.\n\nHere is the exact block that stopped the import madness:\n\n```\n# Project Architecture Constraints\n- This project uses Feature-Sliced Design (FSD).\n- NEVER suggest imports from a top-level `/components` or `/hooks` folder.\n- Components must reside in `/features/[feature-name]/ui` or `/shared/ui`.\n- Always check the file tree before suggesting an import path.\n- If you are unsure of the path, use `ls` to verify the directory structure before writing code.\n```\n\nThe moment I saved that, the behavior shifted. When I asked it to create a new user profile card, it actually looked at `/features/user-profile/ui` instead of inventing a `/components/UserCard.tsx`.\n\n## The trade-off between strict rules and creativity\n\nThere is a risk here. If you make your `.cursorrules` too rigid, the AI stops suggesting architectural improvements.\n\nLast month, I tried to force a very specific naming convention for hooks (prefixing everything with `useCustom-`). I found that Cursor stopped suggesting the built-in React hooks that actually solved my problem because it was too focused on following my naming rule.\n\nI've since learned to categorize my rules into \"Hard Constraints\" (folder paths, types) and \"Preferences\" (naming, style).\n\n| Type | Example | Impact |\n\n| :--- | :--- | :--- |\n\n| Hard Constraint | \"Use Tailwind, never CSS modules\" | High - Prevents broken builds |\n\n| Preference | \"Prefer arrow functions over declarations\" | Low - Purely aesthetic |\n\n| Logic Rule | \"Always wrap async calls in a try-catch block\" | Medium - Improves stability |\n\n## Getting out of the \"Solo Dev\" loop\n\nThe wild part is that I didn't find the `.cursorrules` trick in the official documentation. I found it by digging through a thread in a [ChatGPT](/en/tags/chatgpt/) community where a few of us were comparing how to keep Claude 3.5 Sonnet from forgetting the tech stack in large repos.\n\nBeing part of an AI-focused group is basically a shortcut to avoiding the \"trial and error\" phase of a new tool. Instead of spending a week guessing why the AI is ignoring my file structure, someone else has usually already posted the exact configuration that works.\n\nIf you're tired of guessing, you can dive into the [Resources](/en/category/resources/) section of PromptCube to see how other devs are structuring their AI workflows. It's less about \"how to prompt\" and more about \"how to build a system\" where the AI doesn't fight you.\n\n## A better way to handle AI Questions and Answers\n\nStop asking the AI \"How do I do X?\" and start asking \"Given my current project structure in .cursorrules, what is the most efficient way to implement X?\"\n\nWhen you frame the question around your constraints, the AI is less likely to give you a generic tutorial answer and more likely to give you code you can actually commit.\n\nIf you're still seeing hallucinations, check these three things:\n\n1. Is your `.cursorrules` file in the root? (It must be).\n\n2. Are you using \"Composer\" mode? (Rules apply more consistently there).\n\n3. Are you contradicting yourself in the chat? (If you tell the AI to \"just ignore the rules for a second,\" it often forgets them for the rest of the session).\n\nJoin the PromptCube community if you want to stop treating AI as a magic box and start treating it as a configurable compiler. The gap between a \"good\" AI developer and a \"frustrated\" one is usually just a few lines of configuration in a hidden text file.\n\n[Next NVIDIA uses Nemotron and Palantir Foundry to cut the lag between silicon fab and live →](/en/threads/9160/)", "url": "https://wpnews.pro/news/chatgpt-community-ai-questions-and-answers-curso", "canonical_source": "https://promptcube3.com/en/posts/9171/", "published_at": "2026-09-10 19:08:06+00:00", "updated_at": "2026-09-10 19:44:35.251072+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["Cursor", "ChatGPT", "Claude 3.5 Sonnet", "PromptCube", "Next.js", "React"], "alternates": {"html": "https://wpnews.pro/news/chatgpt-community-ai-questions-and-answers-curso", "markdown": "https://wpnews.pro/news/chatgpt-community-ai-questions-and-answers-curso.md", "text": "https://wpnews.pro/news/chatgpt-community-ai-questions-and-answers-curso.txt", "jsonld": "https://wpnews.pro/news/chatgpt-community-ai-questions-and-answers-curso.jsonld"}}