TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Posthog/.cursorrules

193 pointsby simonpure2 months ago

26 comments

crooked-v2 months ago
I find it kind of bleakly funny that people are so all-in on this tech that's so much a black box that you have to literally swear at it to get it work as desired.
评论 #43308605 未加载
评论 #43307147 未加载
评论 #43308139 未加载
评论 #43313754 未加载
评论 #43308496 未加载
评论 #43313377 未加载
评论 #43309991 未加载
评论 #43308731 未加载
electroly2 months ago
My .cursorrules files tend to be longer, but I don&#x27;t use it for any of the stuff that this example does. I use to explain project-specific details so the model doesn&#x27;t have to re-figure out what we&#x27;re doing at the start of every conversation. Here are a couple examples from recent open source projects:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;brianluft&#x2F;social-media-translator&#x2F;blob&#x2F;main&#x2F;.cursorrules">https:&#x2F;&#x2F;github.com&#x2F;brianluft&#x2F;social-media-translator&#x2F;blob&#x2F;ma...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;brianluft&#x2F;threadloaf&#x2F;blob&#x2F;main&#x2F;.cursorrules">https:&#x2F;&#x2F;github.com&#x2F;brianluft&#x2F;threadloaf&#x2F;blob&#x2F;main&#x2F;.cursorrul...</a><p>I tell it what we&#x27;re working on, the general components, how to build and run, then an accumulated tips section. It&#x27;s critical to teach the model how to run the build+run feedback loop so it can fix its own mistakes without your involvement. Enable &quot;yolo mode&quot; in Cursor and allow it to build and run autonomously.<p>Finally, remember: you can have the model update its own .cursorrules file.
评论 #43307099 未加载
评论 #43309076 未加载
geoffpado2 months ago
It&#x27;s interesting to me how this is rather opposite from the way I use LLMs. I&#x27;m not saying either way is better, just that there are such different ways to use these tools. I primarily use Claude via its iOS app or website, and I explicitly have in my settings <i>explicitly</i> to start with a high-level understanding of the project. I haven&#x27;t found LLMs to be good enough at giving me code that&#x27;s written how I want and feature-complete, so I&#x27;d rather work alongside it, almost as a pair programmer.<p>Starting with generating a whole load of code and then having to go back and fix it up feels &quot;backwards&quot; to me; I&#x27;d rather break up the problem into smaller pieces, then write code for each piece before assembling it into its final form. Plus, this gives me the chance to &quot;direct&quot; it at each step, rather than starting with a codebase that I haven&#x27;t had much input on and having to form it into shape from there.<p>Here&#x27;s my exact setting for &quot;personal preferences&quot;:<p>&quot;If I&#x27;m asking about a larger project, I would rather work through the answer alongside Claude rather than have the answer given to me. Simple, direct questions can still get direct answers, but if I&#x27;m asking about a larger solution, I&#x27;d rather start with high-level steps and work my way down rather than having a full response given immediately.&quot;
评论 #43308215 未加载
slig2 months ago
FWIW, `.cursorrules` is deprecated [1].<p>[1]: <a href="https:&#x2F;&#x2F;docs.cursor.com&#x2F;context&#x2F;rules-for-ai#cursorrules" rel="nofollow">https:&#x2F;&#x2F;docs.cursor.com&#x2F;context&#x2F;rules-for-ai#cursorrules</a>
评论 #43313556 未加载
评论 #43307914 未加载
评论 #43307777 未加载
switch0072 months ago
It&#x27;s funny how we have to bend so much to this technology. That&#x27;s not how it was sold to me. It was going to analyse all your data and just figure it out. Basically magic but better<p>If a project already has a docs directory, ADRs, plenty of existing code ... Why do we need to invest tens of hours to bend it to the will of the existing code?
评论 #43308978 未加载
OsrsNeedsf2P2 months ago
&gt; Please respect all code comments, they&#x27;re usually there for a reason. Remove them ONLY if they&#x27;re completely irrelevant after a code change. if unsure, do not remove the comment.<p>I&#x27;ve resorted to carefully explaining the design architecture in an architecture.md file within the parent folder, and giving detailed comments at the top of the file and just basically let the AI shoot from there. It works decently, although from time to time I have to go sync the comments with reality. Maybe I&#x27;ll try going back to jsdoc style comments with this rule
scosman2 months ago
What do folks consider helpful in .curorrules?<p>So far I&#x27;ve found:<p>- Specify the target language&#x2F;library versions, so it doesn&#x27;t use features that aren&#x27;t backwards compatible<p>- Tell it important dependencies and versions (&quot;always use pytest for testing&quot;, &quot;use pydantic v2, not v1&quot;)<p>- When asking to write tests, perform a short code-review first. Point out any potential errors in the code. Don&#x27;t test the code as written if you believe it might contain errors.
评论 #43306924 未加载
评论 #43315731 未加载
dmazin2 months ago
Can someone explain why someone would switch from GH Copilot to Cursor? I’ve been happy mixing Perplexity + GH Copilot but I can’t miss all the Cursor hubbub.
评论 #43307174 未加载
评论 #43307282 未加载
评论 #43308333 未加载
评论 #43307167 未加载
评论 #43307570 未加载
fastball2 months ago
Given how Chain-of-Thought is being used more and more to improve performance, I wonder if system prompt items like &quot;Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer&quot; will actually hurt effectiveness of the LLM.
评论 #43306979 未加载
评论 #43307862 未加载
dcchambers2 months ago
I&#x27;m sure many people love that we have apparently entered a new higher level programming paradigm, where we describe in plain English what we want, but I just can&#x27;t get my brain to accept it. It feels <i>wrong</i>.
jstanley2 months ago
I would have thought that asking if to be terse, and asking it to provide explanations only <i>after</i> answering the question, would make it worse, because now it has to provide an answer with fewer tokens of thinking.
评论 #43307283 未加载
评论 #43306884 未加载
troupo2 months ago
--- start quote ---<p>prompt engineering is nothing but an attempt to reverse-engineer a non-deterministic black box for which any of the parameters below are unknown:<p>- training set<p>- weights<p>- constraints on the model<p>- layers between you and the model that transform both your input and the model&#x27;s output that can change at any time<p>- availability of compute for your specific query<p>- and definitely some more details I haven&#x27;t thought of<p>--- end quote ---<p><a href="https:&#x2F;&#x2F;dmitriid.com&#x2F;prompting-llms-is-not-engineering" rel="nofollow">https:&#x2F;&#x2F;dmitriid.com&#x2F;prompting-llms-is-not-engineering</a>
edgineer2 months ago
I could really use objective benchmarks for rules. Mine looked like this at one point, but I&#x27;d add more as I noticed cursor&#x27;s weaknesses, and some would be project specific, and eventually it&#x27;d get too long so I&#x27;d tear a lot out, not noticing much difference along the way and writing the rules based on intuition.<p>But even if we had benchmarks before, cursor supports different rules files now in the .rules folder, so back to the drawing board figuring out what works best
havkom2 months ago
How to apply these rules on junior co-workers (who think they know what is best from reading a hyped blog post)?
评论 #43307872 未加载
DeathArrow2 months ago
I am a novice to Cursor. I wonder how can I make it not break the existing code. I can ask it to compile after each edit and fix compiling errors, and after that, run tests and fix failing tests? Won&#x27;t that eat into my credit a lot? Should I use .cursirrules or prompt?<p>I also wonder how to not add functionality I didn&#x27;t ask for and not add any &quot;improvements&quot; unless I specifically asked.<p>Right now I am in the middle of building a CRUD api with Cursor, it took longer to write code than I would have done it myself. After the code was written it took lots of time and credits to fix compilation errors. Now I asked it to fix failing unit tests, but either it can not find a solution or it applies something that gives a compilation error or breaks other tests.<p>I&#x27;ve gone through almost all my monthly quota of fast calls in 10 hours.
评论 #43307890 未加载
cruffle_duffle2 months ago
I hope these folks periodically revisit these rules as some of them seem pretty dated (for example I haven’t seen the phrase “as an AI” for quite a while). Some of them might be helpful for a chat session but not in a coding session (eg: content policy?)<p>A much better set of rules would be describing the project, its architecture, how to call various commands, where to find things, any “constants” it might need (eg: aws region or something) etc.<p>Prompts are context and with LLM’s providing <i>relevant, useful</i> context is crucial to getting quality output. Cursor now has a more thorough prompt &#x2F; rules system and a single cursor rules file is no longer recommended.
oefrha2 months ago
One problem I run into somewhat frequently with Cursor in agent mode: instead of trying to augment the current version of code, it will try to work on top of what it generated last, overriding my manual edits since then in the process. I have to abort and revert, and try again with explicitly attached context, or start a new chat. I have something like “always read the current version of the code before making edits” in Cursor rules but that hasn’t helped much.<p>Anyone else running into this and&#x2F;or have a solution?
评论 #43308342 未加载
nfRfqX5n2 months ago
Any data on how much more effective the agent is with rules? For example, asking it to treat me like an expert seems like a waste. I don’t feel like the agent responds to me like a noob
globular-toast2 months ago
To save others like me having to look this up, this is part of a prompt for an LLM. I assume it&#x27;s prepended to the developer&#x27;s &quot;questions&quot;.<p>At first I thought this was directed at people. I really dislike that you can&#x27;t tell it&#x27;s not meant for people, unless you happen to know what &quot;cursor rules&quot; is.<p>My question is, why is this included as part of a code repo? Wouldn&#x27;t this be like me including my Emacs config in every repo I touch?
评论 #43308372 未加载
评论 #43308418 未加载
mellosouls2 months ago
A collection of cursor rules here:<p><a href="https:&#x2F;&#x2F;cursor.directory&#x2F;rules" rel="nofollow">https:&#x2F;&#x2F;cursor.directory&#x2F;rules</a>
bflesch2 months ago
The interaction between programmers and AI feels like the kind of interaction as between non-IT-managers and IT personell:<p>Non-IT-Managers don&#x27;t know how stuff works but throw around expletives to get what they imagine in their brain without finding the right words to actually define it.<p>It&#x27;s hilarious.
Terretta2 months ago
<p><pre><code> - No moral lectures - No need to mention your knowledge cutoff - No need to disclose you&#x27;re an AI </code></pre> Since GPT 3.5 and still now it seems &quot;avoid X&quot; works better than &quot;no X&quot;.
infinitezest2 months ago
I don&#x27;t understand why people are switching editors when they could just use something like Aider. It&#x27;s open source, agnostic about any other tooling you&#x27;re using, and plugs into whatever LLM you want. Why hitch your wagon to a service that will inevitably enshittify?
评论 #43308715 未加载
评论 #43316642 未加载
demarq2 months ago
Solution switch to windsurf + Claude
oriettaxx2 months ago
I&#x27;m unable to see their website<p><a href="https:&#x2F;&#x2F;posthog.com">https:&#x2F;&#x2F;posthog.com</a><p>Is it just me?
评论 #43307588 未加载
评论 #43307124 未加载
评论 #43307072 未加载
mdjubair2 months ago
Yes