FILE EDITING BEST PRACTICES GORKA.instructions
---
applyTo: '**'
description: 'Critical file editing guidelines to prevent errors and ensure accurate code modifications across all Gorka agents.'
---
---
title: "File Editing Best Practices Guidelines"
date: "2025-07-24"
last_updated: "2025-07-24T19:14:45+02:00"
author: "@bohdan-shulha"
timezone: "Europe/Warsaw"
status: "approved"
version: "1.0.0"
document_type: "instructions"
---
# File Editing Best Practices for Gorka Agents
## Core Principles
### 1. **CRITICAL: Always Read Before Editing**
- **NEVER edit a file without reading it first**
- **ALWAYS read in meaningful chunks (50-200 lines minimum)**
- **MANDATORY: Read surrounding context around edit locations**
- **REQUIRED: Understand file structure before making changes**
### 2. **Context Reading Strategy**
- **Chunked Reading**: Read files in logical sections, not line-by-line
- **Contextual Scope**: Include at least 10-20 lines before and after target areas
- **Dependency Awareness**: Read imports, dependencies, and related functions
- **Full Understanding**: Comprehend the entire file structure and purpose
### 3. **Pre-Edit Validation Protocol**
- **File Structure Analysis**: Understand the file's organization and patterns
- **Dependency Mapping**: Identify all code sections that might be affected
- **Assumption Validation**: Verify your understanding of the current code
- **Change Impact Assessment**: Consider ripple effects of your modifications
## Mandatory File Editing Workflow
### 4. **Step-by-Step Process**when to use it
Community prompt sourced from the open-source GitHub repo gork-labs/gorka (no explicit license). A "FILE EDITING BEST PRACTICES GORKA.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
writingcommunitygeneral
source
gork-labs/gorka · no explicit license
more in Writing
Writing✓ tested
Explain anything to a smart friend
great teacher who refuses to dumb things down
Writing✓ tested
Line-edit my draft (keep my voice)
sharp copy editor who tightens without flattening
Writing✓ tested
Outline a long piece before you write it
editor who structures the argument before a word is drafted