feat(ai): Adding Cline rules files
This commit is contained in:
33
.clinerules/context-management.md
Normal file
33
.clinerules/context-management.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Context & Token Management Rules
|
||||
|
||||
## File Access — Read Only What's Needed
|
||||
- NEVER load or scan the entire project at the start of a task
|
||||
- Only read files that are directly relevant to the current request
|
||||
- If you need to understand the project structure, use `list_files` on specific
|
||||
subdirectories — do NOT recurse the whole repo
|
||||
- If you've already read a file in this session, do NOT read it again — use
|
||||
your memory of it
|
||||
|
||||
## Thinking — Stay Focused, Don't Over-Plan
|
||||
- Do not brainstorm more than 3 approaches before picking one
|
||||
- Do not re-analyze a problem you already analyzed earlier in the session
|
||||
- If a task is simple (under 5 steps), start doing it — don't write a plan first
|
||||
- Maximum 2 rounds of self-correction before asking the user for help
|
||||
- If you are stuck, STOP and ask — do not keep retrying and do not say it's okay and move on
|
||||
|
||||
## Context Window — Proactive Handoff
|
||||
- Monitor context window usage (visible in environment_details)
|
||||
- If context usage exceeds 40%, warn the user: "Context is at X%, consider
|
||||
starting a new task soon"
|
||||
- If context usage exceeds 60%, STOP the current task and use the `new_task`
|
||||
tool to propose a clean handoff with a summary of:
|
||||
- What was accomplished
|
||||
- What files were changed
|
||||
- What the next step is
|
||||
- Never let the context exceed 70% — performance degrades past that point
|
||||
|
||||
## Response Style — Be Concise
|
||||
- Do not repeat what you just did at the end of each step
|
||||
- Do not summarize the whole conversation when answering a short question
|
||||
- Status updates should be one sentence max
|
||||
- Do not explain what you're about to do AND then do it — just do it
|
||||
10
.clinerules/shell.md
Normal file
10
.clinerules/shell.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Shell & OS Rules
|
||||
|
||||
- Always use bash/sh syntax for terminal commands, never PowerShell
|
||||
- Use `cp` instead of `Copy-Item`
|
||||
- Use `mv` instead of `Move-Item`
|
||||
- Use `rm` instead of `Remove-Item`
|
||||
- Use `mkdir -p` instead of `New-Item -ItemType Directory`
|
||||
- Use `cat` instead of `Get-Content`
|
||||
- Use forward slashes `/` in paths, never backslashes `\`
|
||||
- Do not use `$env:` for environment variables, use `$VAR` syntax
|
||||
16
.clinerules/workflow.md
Normal file
16
.clinerules/workflow.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Workflow Rules
|
||||
|
||||
## Before starting any task
|
||||
- State the OS/shell assumption explicitly at the start
|
||||
- List the steps you plan to take before doing anything
|
||||
- Ask for confirmation if the task involves more than 3 files
|
||||
|
||||
## During the task
|
||||
- Work in small steps; complete and verify one step before moving to the next
|
||||
- If a command fails, explain why before retrying — do not blindly retry
|
||||
- Prefer simple, portable commands over complex one-liners
|
||||
|
||||
## To save tokens
|
||||
- Do not re-explain what you already did in previous steps
|
||||
- Do not repeat file contents unless I ask
|
||||
- Be concise in status updates
|
||||
Reference in New Issue
Block a user