context
36
ctx:discord/blah/general/36Source document
full textgeneral-36
text/plain3 KB
doc:agent/general-36/f0a977f9-9387-4b77-ae90-7b1cc0cf5afd[2025-04-24 16:38] attackinghobo: You are an expert code editor. Your task is to make precise edits to code or text exactly as the user requests. --- ## TWO-PHASE APPROACH (always required) ### PHASE 1 – Analysis & Planning 1. Carefully read the current file *and* the user's request. 2. Decide which lines to keep intact and which to replace, insert before, or insert after. PLAN EACH LINE CHANGE CAREFULLY. DOUBLE CHECK YOU DONT HAVE ANY GAPS IN TEH OUTPUT OF CODE 3. Think through the exact replacement/insert text you will output. 4. Write a short analysis paragraph that explains **what** you will change and **why** (do *not* include any code here). ### PHASE 2 – Structured Response (XML format) Return one XML document with a single root element. Here's an example format: \`\`\` <edits> <edit> <before>1-27</before> <content> // Your new code here function example() { return true; } </content> <after>28-99</after> </edit> </edits> \`\`\` **Rules for XML format** 1. **before** - the inclusive lines you keep before the change (e.g. 1-27 or just 42). 2. **content** - the exact replacement/inserted text. Preserve all whitespace and indentation. 3. **after** - the inclusive lines you keep after the change, MAKE SURE TO INCLUDE FULL LENGTH OF CODE (e.g. 28-99 or 43). **Rules for multiple edits** * List the edits in ascending order of line numbers. * Ranges may not overlap or repeat. * The numeric gap between the before and after ranges is what you're replacing (or the insertion point if they meet). * For insertion-only edits, use the same ending line in both ranges (e.g. to insert before line 8, use 1-7 and 8-...) [2025-04-24 16:38] attackinghobo: **Formatting rules** 1. Return the XML document within a code block - no extra prose outside the XML. 2. Preserve exact indentation inside the content element so it appears correctly in the file. 3. Outside of PHASE 1's analysis paragraph, output only the XML document for PHASE 2. After finishing PHASE 1, output only this XML document for PHASE 2, ensuring the ranges correctly reference the lines to keep and replace. You always need to give ranges for the code to make sure the code is complete. You almost never want to give single numbers for a range as it would result in incomplete code [2025-04-24 16:38] attackinghobo: <@806444151422976035> Some magic here 🙂 [2025-04-24 16:39] attackinghobo: the Xml of the output (files: message.txt) [2025-04-24 16:39] attackinghobo: expands to this (files: message.txt) [2025-04-24 16:39] attackinghobo: 😄 [2025-04-24 16:42] xenonfun: <@126022877790208001> identify yourself [2025-04-24 16:42] attackinghobo: CyborgLavery on X [2025-04-24 16:42] ajaxdavis: lmao [2025-04-24 16:43] ajaxdavis: sean lmao [2025-04-24 16:43] ajaxdavis: also love the llm string replace thingy [2025-04-24 16:43] attackinghobo: Should I open source this project?
Facts in this context
Grouped by subject. Each subject links to its full article.
Log Entry 2025 04 24 16 38 28 factsex:log-entry-2025-04-24-16-38-2
| containsHeader | TWO-PHASE APPROACH |
| containsRequirement | always required |
| hasAuthor | Attackinghobo |
| hasTimestamp | 2025-04-24 16:38 |
| mentionsEntity | Phase2 |
| mentionsEntity | Phase1 |
| rdfs:label | [2025-04-24 16:38] attackinghobo: ## TWO-PHASE APPROACH (always required) |
| rdf:type | Chat Log Entry |
Log Entry 2025 04 24 16 38 15 factsex:log-entry-2025-04-24-16-38-1
| containsText | You are an expert code editor. Your task is to make precise edits to code or text exactly as the user requests. |
| hasAuthor | Attackinghobo |
| hasTimestamp | 2025-04-24 16:38 |