
## find how aider prepare prompts

1. Find the Assembly Line (The Macro View)

/ask Before calling self.send() in the main loop, 
Aider has to assemble the final payload. 
Which file and method are responsible for constructing 
the full list of messages (System, Context, User) 
that actually gets sent to the LLM's API?

2. Find the "Secret Instructions" (The System Prompt)

/ask I want to see the exact text instructions 
Aider uses to command the LLM. 
Which file contains the base system prompts that 
tell the model how to behave and how to use the diff edit format?

3. Find the Context Injector (The Files)

/ask When I add a file to the chat, 
how does Aider process it? 
Which method takes the raw text of my local files and 
formats them so the LLM understands they are part of the codebase context?


## find when aider start to edit files

Step 1: Find the Parser

/ask Where in the codebase does 
the system parse the LLM's text response 
to detect a "diff edit format" block?

Step 2: Find the Trigger

/ask Once the edit block is detected, 
which specific Python file and function actually 
execute the command to write the changes to the hard drive?

Step 3: Understand the Core Loop

/ask Which file controls the main chat loop that 
waits for my input, sends it to the LLM, 
and then passes the response to the parser?


## find out how aider let LLM give editing methods

1. Find the String Matching Engine

/ask I am using the diff edit format. 
Which specific file overrides get_edits() for this format, 
and what function actually scans 
the LLM's text stream looking for the <<<<<<< and ======= markers?

2. Find the Disk Writer

/ask Once the edits are parsed from the diff block, 
trace the execution path. 
Which file and function contains the actual 
Python 'open(file, "w")' or equivalent code 
that saves the modifications to my hard drive?

## how ollama launch

> `/ask Where is the CLI command routing logic defined? I am looking for how the system parses terminal commands like 'ollama run' or 'ollama serve'. Point me to the specific .go files and functions that handle CLI arguments.`


/ask I want to trace the execution path of 'ollama launch openclaw'. Start from how the CLI registers the 'launch' command, how it routes to the specific 'openclaw' app, and exactly what daemon or process cmd/launch/openclaw.go spins up. We are just exploring the logic, so do not write or edit any code.

/ask Look specifically inside the ensureOpenclawInstalled() function in cmd/launch/openclaw.go. Show me the exact 'exec.Command()' calls it uses to trigger the installation. I want to see the exact string arguments it passes to the operating system to install npm packages.
