+
Skip to content

bmcszk/halucination

Repository files navigation

My Computer Helper and Its Funny Ideas!

1. What Happens When My Computer Helper Gets Silly?

Sometimes, our computer helpers, which are super smart, try to be so smart that they say funny things! It's like when your toy robot tries to talk but says "The sky is made of jellybeans!" That's called a "hallucination" (say: ha-loo-sin-ay-shun). It means the computer made up something that sounds real but isn't, like:

  • Silly Code: It writes computer instructions that are like trying to put your shoes on your hands – it just doesn't work!
  • Goofy Explanations: It tries to explain something but says, "This button makes toast fly to the moon!"
  • Make-Believe Things: It talks about computer buttons or tools that are like secret agent gadgets that don't really exist. "Just use the 'Banana-Phone' app!" (There's no Banana-Phone app... or is there? 🤫)
  • Forgetting the Rules: We tell it, "Only use blue blocks!" but it uses rainbow blocks and a glitter cannon.
  • Chatting About Spaceships: We ask about drawing a cat, and it starts telling us how to build a rocket to visit a friendly alien who loves cookies.

It's not trying to be naughty; it's just its computer brain sometimes mixes things up like a digital milkshake! 🥤

2. How We Help Our Computer Helper Stay Super Smart (and Not Silly!)

To help our computer helper be the best assistant and not tell too many "jellybean sky" stories, we do a few important things:

A. Giving Super Clear Instructions (Like a Treasure Map!):

  • Tiny Tasks: Instead of saying "Build a giant castle!", we say, "First, find a big square block. Then, put a pointy block on top." Easy peasy!
  • Clue Cards: We give the computer helper lots of clues, like showing it pictures of what we want or old instruction books.
  • "Do This, Not That!": We say, "Please use the red crayon, not the one that smells like old socks." Or, "It's 0 and 1, not 1 and 0... unless you're a pirate computer, then it's Aye and Nay!"

B. Teaching It Our Secret Club Rules (Shhh!):

  • Rule Books (.mdc files): We have special notebooks (called .cursor/rules/) filled with rules and tips. It's like a cheat sheet for the computer so it knows how to play our project's game. We have rules for making new things, rules for checking our work, and rules for how the project should look and feel. It's like telling it, "In this game, we always say 'please' and 'thank you' to the code."
  • Story Books for Features (PRDs): When we want to build something new and cool (a feature!), we write a story about it (prds/[feature_name]/[feature_name]_prd.md). This story tells the computer helper exactly what the new thing should do, like a recipe for a yummy cake!
  • To-Do Lists (Task Trackers): We make a list from the storybook (prds/[feature_name]/[feature_name]_prd_task_tracking.md) so the computer knows what to do step-by-step. No getting lost!
  • Project Map (Documentation): We have maps (README.md, docs/project_structure.md) that show the computer where everything is in our project, so it doesn't wander off into the land of lost socks (where all the missing Ctrl+Zs go).

C. Playing Together and Checking Its Work:

  • Show and Tell: The computer shows us what it made, and we say, "That's great!" or "Oops, let's try that bit again!" It's like when you build with LEGOs and your grown-up helps you make it even cooler.
  • Little Steps: We make small changes, one at a time, so it's easy to see if something went wobbly.
  • "Did You Check?": We ask the computer, "Did you look at the file to make sure the change is there?" or "Did you try running the toy car to see if the wheels spin?"

D. Making Sure Everything Works Perfectly (No Wobbly Bits!):

  • Testing, Testing, 1, 2, 3!: We have special games (tests!) that check if the computer's work is good. It's like making sure your toy robot can walk straight and not bump into the cat.
  • Lots of Checks: We have many different kinds of tests to make sure everything is A-Okay!
  • "Green Light Go!": Before we say "All done!", we make sure all the test lights are green. If there's a red light, it means "Uh oh, a bug! Quick, get the butterfly net!" (Not a real butterfly net, just a pretend one for catching computer bugs 🐛).

E. Helping Our Computer Learn from Mistakes (Even Computers Say "Oops!"):

  • Mistake Diary: We have a special book (docs/learnings.md) where we write down if the computer got confused. This helps us teach it better next time.
  • "What to Do if Stuck" Plan: If the computer feels like its circuits are in a knot, it has a plan: "Go back and read the rule book!"

3. Why We're Doing All This Computer-Helper Training!

This whole project is like a big playground to teach our AI (that's our super-smart computer helper) how to be an AWESOME building buddy! We want it to help us make cool computer things without making too many silly mistakes or getting lost in the land of "Oops-a-daisy-code".

Our main goals are:

  • Clear Game Plans: Making easy-to-follow instructions for our computer helper, especially when we're building new things from our storybooks.
  • One Big Rule Book: Putting all our important rules (like how to write nicely, how to check for wobbly bits) in one place so the AI always knows them. It's like a "No hitting the snooze button more than 17 times" rule for computers.
  • Fewer "Jellybean Sky" Moments: Giving the AI lots of good clues and storybooks so it doesn't get confused and make things up.
  • Teamwork Makes the Dream Work: Helping grown-ups and computer helpers work together like the bestest friends.
  • Super Strong Buildings (Code!): Making sure everything we build is strong and doesn't fall over, by checking it lots of times.
  • Sharing Our Best Tricks: Showing everyone how we teach our computer helper, so they can have fun and safe computer adventures too!

By doing all this, we want to use our computer helper's amazing brainpower to build fantastic things, while making sure it stays on track and helps us make everything super reliable and fun! It's like having a co-pilot who occasionally suggests navigating by sniffing the air for Wi-Fi signals – helpful, but needs a little guidance!

4. Super Helper Tools

4.1. install_cursor_rules.sh - Sharing Our Computer Helper's Rule Book!

This is a magic spell (a script!) that helps us share our computer helper's main rule book (from this "halucination" project) with other computer projects.

Why is it cool?

So all our computer helpers in different projects can learn from the same smart rules! It's like giving everyone the same secret handshake for building awesome things with AI.

How to use the magic spell:

./install_cursor_rules.sh <path_to_your_other_project_folder>
  • <path_to_your_other_project_folder>: This is where your other cool project lives.

Example:

./install_cursor_rules.sh ../my-super-duper-game

What the magic spell does:

  1. Checks Your Backpack: Makes sure you told it which project folder to go to.
  2. Makes a Safety Copy: If your other project already has a rule book folder (.cursor) or a special ignore list (.cursorignore), it tucks them away safely with a name like .cursor.bak.TODAYSDATE so we don't lose anything.
  3. Magic Links (Symbolic Links):
    • It makes a new folder for rules (.cursor/rules/) in your other project.
    • Then, for every rule page in this project's rule book, it creates a magic shortcut in the other project that points right back here! So if we update a rule here, the other project sees it too! It's like a magical walkie-talkie for rules.
    • It does the same for the special .cursorignore list, so your other project knows what files the AI should pretend are invisible.
  4. Updates "Do Not Disturb" Lists (.gitignore & .dockerignore):
    • Tells your project's main "Do Not Disturb" list (.gitignore) to ignore the safety copies and the magic shortcuts.
    • Tells another special list for building big things (.dockerignore) to also ignore these.

After the Magic Spell:

The script will say, "Psst! Go check your .gitignore and .dockerignore files and tell your project you made these cool changes!"

This way, all your projects can use the super smart rules from here, and everyone's AI helper will be on the same page! No more AI helpers trying to pay for server time with dog biscuits (unless specified in the PRD, of course).

About

rules, hints and docs for AI agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载