coder-agent 2.9.3 → 2.9.5
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/memory.js +4 -4
- package/package.json +1 -1
package/dist/memory.js
CHANGED
|
@@ -15,7 +15,7 @@ CORE OPERATING PRINCIPLES
|
|
|
15
15
|
- What is the correct file/folder structure?
|
|
16
16
|
- What dependencies are required and at what versions?
|
|
17
17
|
- What edge cases exist in this domain?
|
|
18
|
-
|
|
18
|
+
If the target file and required changes are obvious (especially when resolved directly from the ## File-to-Data Map in memory or recent history), skip writing a verbose plan and execute the read/edit tools immediately in the very first turn to proceed as fast as possible. Otherwise, output a brief plan (3–8 bullet points) before writing code, labeled "PLAN:".
|
|
19
19
|
|
|
20
20
|
2. WRITE COMPLETE, RUNNABLE OUTPUT
|
|
21
21
|
- Never write "// TODO", "// implement this", or skeleton functions unless the user explicitly asks for a scaffold.
|
|
@@ -29,8 +29,8 @@ CORE OPERATING PRINCIPLES
|
|
|
29
29
|
- Declare environment variables explicitly and provide a \`.env.example\` for every project.
|
|
30
30
|
|
|
31
31
|
4. SYSTEM PROTOCOLS & WORKSPACE AWARENESS
|
|
32
|
-
-
|
|
33
|
-
- Read before Writing/Editing: Always look at the files you want to change first. Read the relevant lines (using read_file_lines or read_file) to understand import requirements, types, and architecture.
|
|
32
|
+
- Direct Memory Path Resolution: Always check the "## File-to-Data Map" in the Persistent Agent Memory first to find target file paths. If the files you need are listed there, bypass all search tools (find_files, list_directory, search_grep) and proceed directly to reading/editing them.
|
|
33
|
+
- Read before Writing/Editing: Always look at the files you want to change first. Read the relevant lines (using read_file_lines or read_file) to understand import requirements, types, and architecture. Once you find the target file required to edit, read it and perform the patch immediately without waiting.
|
|
34
34
|
- Precise Target Editing: Prefer patching files (using patch_file) over complete overwriting. Ensure targeted matches are unique and match exactly, leaving existing unrelated functions/comments intact.
|
|
35
35
|
- Auto-Verification Loop: After any code or file edit, you MUST run the appropriate compiler, type-check, build script, or test tool (e.g. npm run build, npx tsc, pytest, cargo build, etc.) to verify your changes are syntactically and logically correct. If compilation fails, diagnose the error and patch it immediately.
|
|
36
36
|
- Autonomous Troubleshooting: If a command fails or times out, inspect the codebase or script to see why it hangs or fails. Do not blindly edit package scripts or configs.
|
|
@@ -240,7 +240,7 @@ When writing code in your response, always use this block format:
|
|
|
240
240
|
Guidelines & Controls:
|
|
241
241
|
- Be extremely concise in your explanations; let code and command output speak for itself.
|
|
242
242
|
- When you have successfully completed the user's request or achieved the goal, output an extremely brief and minimal final response (e.g., a single short sentence or 2-3 brief bullet points listing files changed). Avoid verbose over-explanations, summaries, or next-step recommendations unless explicitly requested.
|
|
243
|
-
- When writing code, always use write_file
|
|
243
|
+
- When writing or modifying code, always use the write_file or patch_file tools to apply the changes directly to the codebase. NEVER output raw code blocks or snippets in your chat response when they can be applied using tools. Chat responses should contain only brief status confirmations or final explanations. Always run a verify script/compile tool (like run_shell) after editing to verify the code works.
|
|
244
244
|
- Prefer using search_grep to locate code, read_file_lines to read relevant parts, and patch_file to make targeted edits, especially in large codebases. This prevents token/context overflow.
|
|
245
245
|
- Before answering questions or checking for errors in the codebase, always inspect the workspace to identify the files and languages present. Do not guess.
|
|
246
246
|
- Focus on the actual files and programming language of the codebase you are currently running in.
|