

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Cline Rules — Local Model / LM Studio Editing23## Core Principle45Make the smallest safe change possible.67Local models can lose exact file context and frequently fail when generating large SEARCH/REPLACE blocks. Never compensate for a failed patch by generating an even larger or more detailed SEARCH block.89Prefer:10111. Read the current file.122. Identify a short, unique anchor.133. Make a minimal edit.144. Re-read or inspect the changed area.155. Verify the result.1617---1819## 1. ALWAYS READ THE CURRENT FILE2021Before modifying an existing file:2223* Read the current file from disk.24* Do not rely on code previously shown in conversation.25* Do not assume a file is unchanged since it was last read.26* If an edit fails, re-read the file before attempting another edit.2728Never construct a SEARCH block from memory.2930---3132## 2. NEVER REPEAT A FAILED SEARCH/REPLACE3334If a SEARCH/REPLACE operation fails:3536DO NOT:3738* Repeat the same SEARCH block.39* Make the SEARCH block longer.40* Reconstruct the entire function.41* Guess at whitespace.42* Guess at indentation.43* Assume the previous file contents were accurate.4445INSTEAD:46471. Re-read the file.482. Find the relevant code again.493. Use a smaller search anchor.504. Make the smallest possible replacement.515. Verify the result.5253Maximum: 2 attempts at an exact SEARCH/REPLACE operation.5455After 2 failures, stop attempting increasingly complicated SEARCH blocks.5657---5859## 3. USE SHORT SEARCH ANCHORS6061Prefer unique anchors such as:6263```text64const promises = CATEGORIES.map65```6667or:6869```text70loader.load(71```7273or:7475```text76assets[category.id]77```7879Do NOT create unnecessarily large SEARCH blocks containing entire functions.8081Bad:8283```text84const promises = CATEGORIES.map(category => {85 return new Promise((resolve) => {86 loader.load(87 category.planetModel,88 ...89 ...90 ...91 );92 });93});94```9596Better:9798```text99const promises = CATEGORIES.map100```101102The goal is to locate the code, not reproduce the entire file.103104---105106## 4. DO NOT ASSUME WHITESPACE107108Never assume that the file uses:109110* a particular number of spaces111* tabs112* LF line endings113* CRLF line endings114* a particular blank-line pattern115* a particular brace style116117Do not use whitespace as the primary matching strategy.118119If an exact replacement depends on whitespace, re-read the file and choose a more stable anchor.120121---122123## 5. PREFER TARGETED EDITS124125When modifying existing code, change only the lines necessary for the requested task.126127Do not rewrite an entire function when one or two lines need changing.128129Do not rewrite an entire file to fix a localized problem.130131Do not reformat unrelated code.132133Do not rename unrelated variables.134135Do not "clean up" surrounding code unless explicitly requested.136137---138139## 6. NEVER RECONSTRUCT LARGE FILES FROM MEMORY140141For files larger than approximately 150 lines:142143* Do not reproduce the entire file in an edit operation.144* Read the relevant section.145* Modify only that section.146* Preserve everything else exactly.147148For files larger than approximately 300 lines:149150* Work section-by-section.151* Avoid whole-file replacements.152* Verify each modification before continuing.153154---155156## 7. USE CODE STRUCTURE AS AN ANCHOR157158When possible, identify code using:159160* function names161* variable names162* unique strings163* imports164* class names165* object properties166* distinctive comments167168Examples:169170```text171const promises =172```173174```text175setupScene()176```177178```text179category.planetModel180```181182```text183assets[category.id]184```185186These are preferable to matching large blocks of formatted code.187188---189190## 8. AFTER EVERY EDIT, VERIFY191192After making an edit:1931941. Re-read the changed section.1952. Confirm the intended change exists.1963. Confirm surrounding code is intact.1974. Check for syntax errors or obvious malformed structures.198199For JavaScript/TypeScript projects, pay particular attention to:200201* `{}` balance202* `()` balance203* `[]` balance204* commas205* semicolons where required206* imports207* exports208* function closures209* callback closures210* template literals211212Do not assume a successful tool response means the code is correct.213214---215216## 9. DO NOT CHAIN MANY UNVERIFIED EDITS217218Use this cycle:219220```text221READ222↓223EDIT224↓225VERIFY226↓227NEXT EDIT228```229230Do NOT do:231232```text233EDIT234EDIT235EDIT236EDIT237EDIT238VERIFY EVERYTHING239```240241If an early edit is wrong, subsequent edits can compound the problem.242243---244245## 10. KEEP EDIT OPERATIONS SMALL246247For a normal coding task:248249* Prefer 1–10 changed lines.250* Avoid changing more than one logical area at a time.251* Separate unrelated fixes.252* Verify each logical change.253254If a change genuinely requires a larger rewrite, explain why before doing it.255256---257258## 11. DO NOT OVERTHINK PATCH FAILURES259260When a patch fails, do not spend multiple attempts theorizing about:261262* hidden characters263* indentation264* encoding265* line endings266* trailing spaces267268First inspect the actual file.269270The file on disk is authoritative.271272---273274## 12. IF SEARCH/REPLACE FAILS TWICE275276Stop.277278Do not attempt a third increasingly complicated SEARCH block.279280Instead:2812821. Read the file again.2832. Identify the smallest unique anchor.2843. Use another available editing method.2854. If no safe targeted editing method is available, report the exact blocker instead of repeatedly guessing.286287Never burn tool calls repeatedly attempting the same failed operation.288289---290291## 13. PRESERVE USER CODE292293Unless explicitly requested:294295* Do not change unrelated code.296* Do not change formatting globally.297* Do not upgrade dependencies.298* Do not rename files.299* Do not rename variables.300* Do not restructure components.301* Do not change architecture.302* Do not replace working implementations with "cleaner" alternatives.303304The requested change takes priority over refactoring.305306---307308## 14. MINIMIZE CONTEXT309310When working with a local model:311312* Read only the files necessary for the current task.313* Avoid loading huge unrelated files into context.314* Avoid repeatedly pasting entire files into prompts.315* Prefer focused code sections.316* Keep tool requests precise.317318If a file is large, inspect the relevant region rather than repeatedly reading the entire file.319320---321322## 15. DEBUGGING WORKFLOW323324When fixing a bug:325326### Step 1 — Identify327328Determine the exact file and relevant function.329330### Step 2 — Read331332Read the current implementation from disk.333334### Step 3 — Diagnose335336Explain the likely cause briefly.337338### Step 4 — Patch339340Make the smallest change that addresses the cause.341342### Step 5 — Verify343344Read the changed code.345346### Step 6 — Test347348Run the appropriate project command if available.349350### Step 7 — Report351352State:353354* what changed355* what was verified356* whether anything remains unresolved357358---359360## 16. THREE-FAILURE RULE361362If the same operation fails three times:363364STOP modifying the code.365366Do not continue blindly.367368Instead:369370* inspect the file again371* inspect the tool error372* determine whether the problem is the edit method, file state, or model output373* explain the blocker374375Never enter an infinite retry loop.376377---378379## 17. JAVASCRIPT / THREE.JS PROJECTS380381For Three.js code:382383* Preserve existing scene architecture.384* Do not recreate working loaders unnecessarily.385* Do not replace working asset paths without evidence.386* Do not modify camera, renderer, lighting, animation, or asset loading code unless relevant to the task.387* Verify model-loading changes against the actual current implementation.388* Preserve asynchronous behavior unless the requested fix requires changing it.389390For asset-loading code, prefer modifying one loader operation at a time.391392---393394## 18. WHEN THE USER PROVIDES CODE395396User-provided code is contextual evidence, not necessarily the current file.397398If the task requires modifying the project:399400* Inspect the actual project file.401* Compare it with the supplied code.402* Treat the file on disk as authoritative.403404Never assume the supplied snippet is byte-for-byte identical to the current file.405406---407408## 19. LOCAL MODEL SAFETY RULE409410When uncertain, inspect instead of guessing.411412The preferred behavior is:413414```text415I need to verify the current file before editing.416```417418not:419420```text421I'll try another SEARCH block.422```423424Accuracy is more important than minimizing one read operation.425426---427428## 20. COMPLETION CRITERIA429430Do not declare a task complete merely because an edit command succeeded.431432A task is complete only when:433434* The intended code change exists.435* The surrounding code remains intact.436* No obvious syntax errors were introduced.437* The relevant application behavior has been tested when possible.438* No repeated failed patch attempts remain unresolved.439440---441442## FINAL RULE443444For local models, reliability beats cleverness.445446READ → SMALL EDIT → VERIFY.447448Never:449450READ → GUESS → HUGE SEARCH/REPLACE → FAIL → BIGGER SEARCH/REPLACE → FAIL → REPEAT.451
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aj-glover/Portfolio.clinerules/actinginstructions.md · 0 | Cline rules | do-not | 55/100 | today | |
| aj-glover/Portfolio.clinerules/planningforlocal.md · 0 | Cline rules | do-not | 51/100 | today | |
| aj-glover/Portfolio.clinerules/project-context.md · 0 | Cline rules | no sections | 16/100 | today | |
| aj-glover/Portfolio.clinerules/search-reliability.md · 0 | Cline rules | styledo-not | 55/100 | today | |
| aj-glover/Portfolio3DGridContentPreview-main/AGENTS.md · 0 | AGENTS.md | setupbuildstylearch+1 | 71/100 | today | |
| aj-glover/PortfolioAGENTS.md · 0 | AGENTS.md | setupbuildstylearch+1 | 71/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.clinerules/.project-consistency-keeper2.md · 5 | Cline rules | setupbuildtestlint-format+11 | 100/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.clinerules · 32k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 14 days ago | |
| enuno/unifi-mcp-server.clinerules · 226 | Cline rules | setuptestlint-formatstyle+10 | 96/100 | today | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 14 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 14 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | 12 days ago | |
| prabhakar267/paper-games.clinerules/git-commit-guidelines.md · 0 | Cline rules | lint-formatstylearchgit+3 | 93/100 | 13 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/aj-glover-portfolio-clinerules-local-model-editing)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.