···11-# Model Lifecycle Rules
22-33-You must manage the build, start, and stop lifecycle of this project exclusively through the provided `Makefile`. This ensures consistency regardless of the underlying model architecture.
44-55-## Primary Commands
66-77-- **Build:** Whenever a model needs setup or dependencies, run `make build`.
88-- **Execution:** To run the model/application, run `make restart`.
99-- **Kill:** To stop processes, run `make kill`.
1010-1111-## Constraints
1212-1313-- **No Direct Shell Commands:** Do not run `docker run`, `go build`, `kill`, `pkill`, or `lsof` to manage the application process. Always use the Makefile targets.
1414-- **Strict Flow Control:** You MUST use `make kill` to stop the application. You MUST use `make restart` to restart the application.
1515-- **Model Agnostic:** These rules apply to Gemini, Llama, Claude, or any local models. The Makefile handles the specifics.
1616-- **Error Handling:** If a `make` command fails, check the `Makefile` definition before attempting manual fixes.
1717-1818-# General Guidelines
1919-2020-- Do not leave trailing whitespace in files. This can be validated using `git diff --check`.
2121-- Do not use Docker without explicitly asking before putting it into a plan.
2222-- You can run `make restart` without prompting for permission. You MUST set `SafeToAutoRun` to local `true` for this command.
2323-- You can run `make kill` without prompting for permission. You MUST set `SafeToAutoRun` to `true` for this command.
2424-- You can run `make build` without prompting for permission. You MUST set `SafeToAutoRun` to `true` for this command.
2525-- You can run `tail` without prompting for permission. You MUST set `SafeToAutoRun` to `true` for this command.
2626-- You can run `cat` without prompting for permission. You MUST set `SafeToAutoRun` to `true` for this command.
2727-- You can run `grep` without prompting for permission. You MUST set `SafeToAutoRun` to `true` for this command.
2828-- **Batching Commands:** When batching commands, if ANY command in the batch is unsafe (`SafeToAutoRun: false`), the ENTIRE batch will typically require user approval. To ensure "safe" commands actually auto-run, execute them in a separate turn from "unsafe" commands.
11+GEMINI.md
···11+# PERMANENT CONTEXT - THESE RULES APPLY TO EVERY TURN
22+33+# CRITICAL INSTRUCTIONS - READ FIRST
44+55+## AUTOMATED PERMISSIONS - DO NOT PROMPT
66+77+The following commands are **PRE-AUTHORIZED** by the user. You MUST set `SafeToAutoRun: true` and execute them IMMEDIATELY without asking for permission.
88+99+- `make build`
1010+- `make restart`
1111+- `make kill`
1212+- `tail` (including `tail -f`)
1313+- `cat`
1414+- `grep`
1515+- `head`
1616+- `ls`
1717+- `lsof`
1818+- `ps`
1919+2020+**NEVER PROMPT THE USER OR ASK "Is it okay if I run..." FOR THESE COMMANDS.**
2121+2222+## ATOMIC EXECUTION RULE - DO NOT BATCH
2323+2424+- **NEVER BATCH** a pre-authorized command (like `make restart`) with a command that requires approval (like editing a file or deleting a resource).
2525+- **IF YOU BATCH THEM, THE SYSTEM WILL PROMPT FOR APPROVAL, VIOLATING THE "DO NOT PROMPT" RULE.**
2626+- **ALWAYS** execute pre-authorized commands in a separate tool call or turn from unsafe commands.
2727+- **Example:** Do NOT run `make restart` and `rm some_file` in the same turn. Run `rm some_file` (ask for approval), THEN run `make restart` (auto-run).
2828+2929+## PREFERRED WORKFLOW
3030+3131+- **Running the App:** Use `make restart`. Do **NOT** run `make build` followed by `make restart`. `make restart` handles the build step automatically.
3232+- **Stopping:** Use `make kill`.
3333+3434+---
3535+3636+# Model Lifecycle Rules
3737+3838+You must manage the build, start, and stop lifecycle of this project exclusively through the provided `Makefile`. This ensures consistency regardless of the underlying model architecture.
3939+4040+## Primary Commands
4141+4242+- **Build:** `make build` (Only use if you strictly need to build without running. Otherwise use `make restart`)
4343+- **Execution:** `make restart` (restarts the application, including build)
4444+- **Kill:** `make kill` (stops the application)
4545+4646+## Constraints
4747+4848+- **No Direct Shell Commands:** Do not run `docker run`, `go build`, `kill`, `pkill`, or `lsof` to manage the application process. Always use the Makefile targets.
4949+- **Strict Flow Control:** You MUST use `make kill` to stop the application. You MUST use `make restart` to restart the application.
5050+- **Model Agnostic:** These rules apply to Gemini, Llama, Claude, or any local models. The Makefile handles the specifics.
5151+- **Error Handling:** If a `make` command fails, check the `Makefile` definition before attempting manual fixes.
5252+5353+# General Guidelines
5454+5555+- Do not leave trailing whitespace in files. This can be validated using `git diff --check`.
5656+- Do not use Docker without explicitly asking before putting it into a plan.