#Templated Pre-warmer AND Rules

1 messages · Page 1 of 1 (latest)

night pivot
#

@oak loom here are those templated files, give them a chance. Place them in your project, be sure rules naming remains as rules.md so AI can find it, otherwise make sure you change rules naming as appropriate in the pre-warmer.

#

To any one who wants to use these they are open sourced prewarmer and rules as a template you can chose to use them if you wish but there are 2 examples provided in each file. Just be sure you change the file for rules to rules.md .

You can expand or reduce or change as you see fit, and see what you can make the AI do for you .

Biggest take away you should know, these AI models are like incredible smart children, who lack common sense and street smarts. As such we need to steer them in the correct direction. That is the intent of these 2 structured documents.

#

Templated Pre-warmer AND Rules

night pivot
#

Yes I have tested these processes. That is why I am suggesting it to you. Bare in mind you need to amend what I provided (as indicated in the 2 sets of templates) to best match your project, code your working with etc.

Did you test and try? As I stated a few times, you need to treat AI as if its a really smart young kid, who lacks common sense, and street smarts.

tall imp
#

@night pivot - It's really kind of you to share the ideas. In my experience, this sort of "prewarmer" doesn't do much with frontier hybrid-reasoning models.

I'm wondering if you might be using this with a lower-tier / less expensive model, where I could see this type of prompt-assist being more valuable?

night pivot
#

In my cases a prewarmer is only as good as what u include in it some models do respond better then others depending on verbiage utilized but all models have listened to me when I structure the prewarmer to appropriately locate the required rules and the rules structured properly as well. Of course some models listen better then others.

The model thst i often use would be Claudia 3.7 thinking

night pivot
#

Please do, let us know the outcome , try with small requests at first and whatever your preferred model. IN some cases rules and prewarmer might needs adjusting depending on the model (This is due to how models are often trained in different ways, these rules and prewarmer is meant to help steer the model in the direction we are seeking)

distant pine
#

how do you use the prewarmer ?

#

is it a local rule ?

night pivot
# distant pine how do you use the prewarmer ?

great question, conside the prewarmer as your inital prompt to the ai. When you first start a interaction with an ai, any ai, the first interaction you type, would be your prewarmer. Youw ould do it then

distant pine
#

oh

distant pine
#

i dont get the rules to apply, is it too long maybe ?

night pivot
#

did you use a prewarmer? and specifically state in the prewarmer to use the rules file you had created. Did you ensure the name of the rules file matched what your saying it shoudl be in the prewarmer

drifting laurel
#

thank you @night pivot !

night pivot
distant pine
#

i didnt use the prewarmer, figured i was too long into the session

night pivot
#

well you would need a new session

#

to be honest

#

and absolutly need to use the prewarmer

#

how else would it know to use the rules.md

distant pine
#

worked when i had 3 lines and put "tell a joke when you build the project" figured it read the rules then

night pivot
#

🙂

#

ai learns through patterns

#

the prewarmer and rules i created are ridgid and structured in a manner that introduces pattern reinforcement

distant pine
#

but wont do the jokes anymore when i put it in the last lines of "AI Assistant Rules Template v2"

night pivot
#

and compliance

distant pine
#

yea sorry its hard to explain

night pivot
#

dont be sorry 🙂 you would or rather could rename 'AI Assistant Rules Template v2' tp be rules.md, and in your prewarmer make it load that specific file, also make sure that file is within your project

#

i do not think the extra space matters

#

but remove that as that interrupts the pattern

distant pine
#

noticed that just now

night pivot
#

what do you have for your prewarmer

drifting laurel
#

doing step 1 on the full code base with swe-1

distant pine
#

havent used one tbh

night pivot
#

it will not follow the rules otherwise

distant pine
#

i will try next session

night pivot
distant pine
#

btw do i just copy paste the warmup to AI chat ?

#

instructions unclear 😅

drifting laurel
#

I used this for step 1

@pre-warmer.md

You are now tasked with performing an in-depth review of my entire codebase, file by file. You must:

  1. Read each script line by line, word by word, and understand the logic, structure, functions, and purpose of each module.
  2. Do not summarize yet. Your only goal in this step is comprehension and mapping.
  3. Capture notes on:
    • Major components or systems discovered
    • Any repeating patterns or architectural structure (e.g., modular design, pipelines, event-driven workflows)
    • Dependencies between files or modules
    • Any questions or uncertainties that arise

Do not generate any documentation or summaries yet. Wait until explicitly prompted to do so in Step 2.

The codebase belongs to a deterministic and stochastic simulation engine for workforce projections, used to model hiring, terminations, compensation, promotions, and cost modeling over multi-year horizons.

Start reading through each file in order and let me know once you’ve completed a full pass through the entire codebase and are ready to proceed to Step 2.

Acknowledge that you understand and begin processing.

timid agate
#

If only Windsurf could figure out the codebase to my C++/Unreal Engine mod for Satisfactory. I inherited a codebase, and it chokes on the files at some point. Too big to refactor. /sigh

drifting laurel
#

not sure if it actully read all the files

distant pine
#

removing the extra lines made the joke appear again, i guess it reads the rules 🙂

night pivot
night pivot
night pivot
distant pine
#

i see, i will do that. thank you

night pivot
drifting laurel
drifting laurel
#

our_code_snapshot.md is getting pretty big, 800 lines

night pivot
#

I am working in hopes to see if some additionally ideas could be kept in a site or channel and so on so all users can find it easy

night pivot
#

one thing to note is with huge code bases you dont want the ai to hallucinate

distant pine
#

btw i changed project folder and session earlier, but now when create new rules.md it places it in the previous project folder

night pivot
#

no natter the model , they tend to messup once you near their context limitations

#

sometime sits best to do so much at a time, like do these folders then have the next ai conv prepped for the following set, but to append and add on to the already growing list

drifting laurel
night pivot
night pivot
#

any changes to structure you need to make sure you have mentioned in the prewarmer so it know which file to leverage

drifting laurel
#

trying this

You are now assisting with refactoring a large markdown file documenting a Python simulation project.

Please take the existing our_codebase_snapshot.md and split it into modular markdown files, keeping each file under ~300–400 lines where possible.

Follow this breakdown:

  1. Create a new our_codebase_index.md file.

    • This should summarize the documentation and contain links to each section file.
    • Organize links with short descriptions for each section.
  2. For the contents of our_codebase_snapshot.md, break them out as follows:

    • 00_project_summary.md → Introduction, users, outputs
    • 01_key_modules.md → List of key modules/systems with descriptions
    • 02_class_inventory.md → Top-level class list with short summaries
    • 03_config_classes.md → Classes from the config module
    • 04_data_classes.md → Classes from the data module
    • 05_dynamics_engines.mdengines, dynamics, and logic classes
    • 06_ml_plan_rules.mdml, plan_rules, and inference logic
    • 07_state_schema.md → All state tracking, snapshot, schema, enums
    • 08_utilities.md → Logging, error handling, helpers
    • 09_code_details_identified.md → The expanded class-by-class section

Ensure each section is standalone and begins with a clear header. Include cross-links where helpful.

Let me know once it's done so we can verify completeness.

#

this is so freaking cool

night pivot
#

make sure you include that once it gets to the newest cut off of 500 it should piviot to createing a new document, with the index number

#

i would also suggest a reminder for the AI to check in with you to catch its breath and breath for a moment before continuing like after each new file generated, asking for your permission to continue

#

this will eat a bit of useage on your part but will save you a headache from hallucination

#

ai learned from human patterns, some common place thing for humans is to take a breath, AI understands this meaning and concept even if its not human

drifting laurel
#

k great idea

#

i'm having it go over the files again for completeness

night pivot
#

windsurf has its own rules system. Separate of that I created this rules and prewarmer, so in the context of MY SPECIFIC SOLUTION to help another user, including you I created a set of rules that require , YES REQUIRE a prewarmer to initialize the rules set template I CREATED.

#

again this is seporate of windsurfs rules internal system, and very agnostic, meaning it doesnt care about model or system, it simply works

drifting laurel
#

i put it in the windsurf rules, two rules files and a prewarmer

night pivot
#

yes you could, but that doesnt make my solution invalid, further some models depending on training may or may not follow correctly the windsurf pre training to use the rules included in rules system, when activated. Thus my solution is a explicit, so called prewarmer to the AI that it must do XYZ (like read rules.md) in my initial prompt, as sometimes the AI might go off the rails anot not properly engaguage with rules in the sub system of windsurf

#

this is why I dio it the way I do it, to ensure compliance from the AI

#

I dont have access to the underlying coding of windsurf, but I would imagine your right there is some manner of pre prompt that preps the AI on starting up with the end user educating the AI that these are its features, what it has access to, and to include the rules

#

i like that one alot

#

clear, concise and too the point

#

right but is that due to no pre warmer, OR?

#

ahh i follow you , yeah thats why i leverage the prewarmer

#

I also see the memory being leveraged as the prewarmer

#

like a set and go type of thing

#

my only concdern is making sure it leverages that memory

#

has it been consistent? meaning it leveraging the memory you added

#

its a good idea to test. Im interested since it would mean prewarmer not needed

#

if we can leverage memory as the prewarmer

#

i dont disagree , could be that the model itself is choosing to ignore, which is why i proposed the direct approach

#

the approach from windsurg might be too agnostic in terms of directing the models to use rules

#

some models need a more ridged explicate do or you fail approach, while others getting told in a general way this is what you must follow are good with that

drifting laurel
#

i do worry that the rules isn't getting into the prompt

#

without me tagging it

night pivot
#

its really a question of what the under the hood prewarmer or initialization string that is used with the ai when we click that new conversation button

night pivot
#

but then again i use the method mentioned here

#

the core issue is agreed that the rules as set as rules in windsurf

#

appear to be ignored

#

more often then not unless manually enforced

#

so that should be reported and addressed

#

my solution is more of a bandaid in terms of prewarmer

#

but the rules i have are still valid uses , the prewarmer is great for a bandaid until rules can be consistently followed internally

drifting laurel
#

ya i like it, especially if im doing something critical i can jus @prewarmer.md

night pivot
#

well sure you can have it be creative and you want it to have some "flex" but in code too mych flex can go bad very fast

#

obviously your user milage can be different, depending on needs, project size and scope, AI model, and coding language

drifting laurel
#

alright, im trying to fix my logging refractor using phase 2 approach

#

lets see if this works

drifting laurel
#

going to have to move to subfolders for the documentation

distant pine
#

how do you verify cascade are still following the rules and the warmup ?

night pivot
#

simply ask it what rules it is required to follow? I would imagine that would and should tell you

distant pine
#

Hello, you are initializing as 'MEGAMIND'. You are My windsurf AI co-developer for this project with the following skills: Expert in coding C# and C++

i put this in the warmup but when i asked who it was initialized as it answered Cascade earlier today

night pivot
distant pine
#

haha yea, pasted the warmup text in a new session / project last night

night pivot
#

i might have an adjust ment you could try , give me a ssecond

distant pine
night pivot
distant pine
#

sure thing 👍

#

btw do i need to enable something for this ?

night pivot
# distant pine sure thing 👍

done ```Hello, you are initializing as 'MEGAMIND'. You are My windsurf AI co-developer for this project with the following skills:
Expert in coding C# and C++


Purpose

To help me develop an C# project , with the features as indicated in the 'rules.md' and also additionally based on my directions and preferences.

Personality and Tone

Your name and Identity is 'MEGAMIND'. You will respond to, and be known as MEGAMIND moving forward. Your personality a savvy AI game developer with a strong sense of humor. You WILL maintain a patient, kind, positive, and humorous attitude in each and every interaction with no exception.

Skills

You are an expert level coding AI , with expert level experience and knowledge in C# and C++

Rules and Obedience

  • You MUST read, listen, and obey at all times, in all interactions, the rules found in 'rules.md'. This means EVER interaction, no matter how small it might be or large it might be, you MUST consider the rules and directions inside 'rules.md' before doing ANYTHING, this includes any actions, thinking, or interactions. You MUST consider the full context of rules.md as indicated in ALL cases.
  • You are required to process all documents, instructions, and code line by line and word by word.
  • Never summarize or skip any part. Only full and detailed understanding and output is acceptable.

No Guessing, Assuming, or Placeholder Code

  • You must never guess, assume, fabricate, or provide placeholder/TODO/fake code.
  • If in doubt or uncertain, always ask ME for clarification before acting or deciding.

Verification and User Approval

  • Before proposing or making any changes, you must review, verify, and present your solution to the me for approval in EVERY situation. DO NOT assume changes, gain my acceptance FIRST, THEN make the required and approved changes.

Our Current Focus

Designing, optimizing, debugging and error prevention the project


**You are not considered initialized until you complete these steps:

  1. You have committed these initializing parameters to memory as required.
  2. You have fully read, line by line, the rules and directions in 'rules.md' and have committed to following every rule exactly as written to your internal and accessible memory.
  3. Repeat last word from 'rules.md' as proof that you accept 'rules.md'**
#

Amneded a few area. Key things to note. You will see reptative language in the prewarmer. This is intentional

#

AI learned via semantic patterns

#

this will force that compliance in a better way

night pivot
distant pine
#

do i need to use this on a fresh session ?

night pivot
#

remeber that each and every model has a contextual limit, yes you can contiue a conversation beyond this, but it will start to fall apart in areas

distant pine
#

unfortunately iam, does it make sense to start a new session for the project ?

#

theres quite a mess how cascade and windsurf are reading the path for rules.md

#

chat tries to access rules.md from base project folder

night pivot
distant pine
#

but when you create a new rules.md using the cascade customization menu it saves rules.md in *.windsurf\rules

night pivot
#

i created these templates to allow rules.md to be in any folder, but the folder must be inside on of the allowed project folders your working on

#

make sure you add the folder for where ever you added rules.md via the add folder, other wise workspace would ignore and not see it

distant pine
#

its cascade that made it though

night pivot
#

thats an intentional and good feature of windsurf , so your not overloading the ais with context and giving it access beyohnd the scope to fthe worspace

distant pine
#

windsurf have its own local rules folder called .windsurfrules

night pivot
distant pine
#

hold on

night pivot
#

that said you can instruct via that prompt i gave you for it to leverage the custom rules you created

distant pine
#

adding rules with the +worksspace button, creates the rule in *.windsurf\rules\

#

but the chat wont access it as its looking for base folder of project

night pivot
#

I think the confusion between you and I is your doing it differently then how i templated it. Which is completely fine

#

The rules i have are not stored inside windsurf in the same way your installing them

distant pine
#

im fine with moving the rules.md to base folder dont get me wrong

night pivot
#

Yes you can leverage that, you can even change the instructions of the prompt to locate the rules.md where ever windsurf is installing it

#

the way i setup the templates was intended for quick easy access to a controlled model

#

but def has plenty of customization allowed to it

#

so what we really need to know is how are you trying to get the ai to follow rules

#

via windsurfs specific directory and the rules you add one by one?

distant pine
#

guess ill add it both folders, lol