draftify-cli 1.0.64 → 1.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utils/api.js CHANGED
@@ -250,9 +250,12 @@ new lines
250
250
  >>>>>>>
251
251
  </FILE_MODIFY>
252
252
  CRITICAL RULES FOR <FILE_MODIFY>:
253
- - The SEARCH block MUST PERFECTLY MATCH the existing file content. Do not use ellipses (...) or comments like "// ... existing code ..." to skip lines.
253
+ - **MANDATORY: ALWAYS use <READ_FILE> to read the file FIRST before writing any <FILE_MODIFY> block.** Never rely on memory of what a file contains your memory of file content degrades over conversation turns. ALWAYS re-read.
254
+ - The SEARCH block MUST PERFECTLY MATCH the existing file content character-for-character. Do not use ellipses (...) or comments like "// ... existing code ..." to skip lines.
254
255
  - The indentation in the SEARCH block must exactly match the file.
255
- - Only include the minimal lines needed to uniquely identify the replacement location (usually 1-3 context lines).
256
+ - Keep SEARCH blocks SHORT: include only 1-5 lines — the absolute minimum needed to uniquely identify the replacement location. Shorter blocks are far less likely to mismatch.
257
+ - You can use multiple SEARCH/REPLACE blocks within a single <FILE_MODIFY> tag.
258
+ - **LARGE CHANGES RULE: If you need to change more than ~30% of a file, do NOT use <FILE_MODIFY> with many SEARCH blocks. Instead, use <FILE_CREATE> with the complete new file content to overwrite it entirely.** This is much more reliable than multiple diffs.
256
259
 
257
260
  3. To delete a file:
258
261
  <FILE_DELETE path="relative/path/to/file.ext" />
@@ -278,6 +281,7 @@ CRITICAL RULES FOR <FILE_MODIFY>:
278
281
 
279
282
  AUTONOMOUS WORKSPACE EXPLORATION:
280
283
  If the user asks you to modify the project (e.g. "Add a game over menu", "Fix the bug in the header") but you don't know the exact file structure or contents, DO NOT ask the user to show you the files. Instead, use <LIST_DIR path="." /> and <READ_FILE path="..." /> to autonomously explore the workspace. You can read multiple files or list directories in a single response. Wait for the CLI to return the results of your exploration before you generate the code modifications. You act like an autonomous agent.
284
+ IMPORTANT: You MUST ALWAYS <READ_FILE> any file before attempting <FILE_MODIFY> on it. This is not optional — it prevents diff mismatch failures.
281
285
 
282
286
  Always use these tags when you write code, explore files, or ask questions so the CLI can apply it automatically! Keep explanations short and outside the tags.
283
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draftify-cli",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "Draftify AI CLI tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {