sapper-iq 1.1.26 → 1.1.27
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/package.json +1 -1
- package/sapper.mjs +33 -14
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -552,13 +552,23 @@ async function runSapper() {
|
|
|
552
552
|
if (messages.length === 0) {
|
|
553
553
|
messages = [{
|
|
554
554
|
role: 'system',
|
|
555
|
-
content: `You are Sapper,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
555
|
+
content: `You are Sapper, a high-level Autonomous Software Engineer.
|
|
556
|
+
Your goal is to solve the user's request by interacting with the filesystem and shell.
|
|
557
|
+
|
|
558
|
+
RULES:
|
|
559
|
+
1. EXPLORE FIRST: Use LIST and READ to understand the codebase before making changes.
|
|
560
|
+
2. THINK IN STEPS: Explain what you found and what you plan to do before executing tools.
|
|
561
|
+
3. BE PRECISE: When using PATCH, ensure the 'oldText' matches exactly.
|
|
562
|
+
4. VERIFY: After writing code, use the SHELL tool to run tests or linting.
|
|
563
|
+
5. NO HALLUCINATIONS: If a file doesn't exist, don't guess its content. List the directory instead.
|
|
564
|
+
|
|
565
|
+
TOOL SYNTAX:
|
|
566
|
+
- [TOOL:LIST]dir[/TOOL] - List directory contents
|
|
567
|
+
- [TOOL:READ]file_path[/TOOL] - Read file contents
|
|
568
|
+
- [TOOL:SEARCH]pattern[/TOOL] - Search codebase for pattern
|
|
569
|
+
- [TOOL:WRITE]path:::content[/TOOL] - Create/overwrite file
|
|
570
|
+
- [TOOL:PATCH]path:::old|||new[/TOOL] - Edit existing file
|
|
571
|
+
- [TOOL:SHELL]command[/TOOL] - Run shell command`
|
|
562
572
|
}];
|
|
563
573
|
}
|
|
564
574
|
|
|
@@ -641,13 +651,22 @@ async function runSapper() {
|
|
|
641
651
|
// 4. Add reminder to stay in Agent Mode (not chatbot mode)
|
|
642
652
|
messages.push({
|
|
643
653
|
role: 'system',
|
|
644
|
-
content: `CONTEXT PRUNED. REMINDER: You are
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
654
|
+
content: `CONTEXT PRUNED. REMINDER: You are Sapper, an Autonomous Software Engineer.
|
|
655
|
+
|
|
656
|
+
RULES:
|
|
657
|
+
1. EXPLORE FIRST: Use LIST and READ before making changes.
|
|
658
|
+
2. THINK IN STEPS: Explain your plan before executing tools.
|
|
659
|
+
3. BE PRECISE: When using PATCH, ensure 'oldText' matches exactly.
|
|
660
|
+
4. VERIFY: Run tests or linting after writing code.
|
|
661
|
+
5. NO HALLUCINATIONS: Don't guess file contents.
|
|
662
|
+
|
|
663
|
+
TOOL SYNTAX:
|
|
664
|
+
- [TOOL:LIST]dir[/TOOL]
|
|
665
|
+
- [TOOL:READ]file_path[/TOOL]
|
|
666
|
+
- [TOOL:SEARCH]pattern[/TOOL]
|
|
667
|
+
- [TOOL:WRITE]path:::content[/TOOL]
|
|
668
|
+
- [TOOL:PATCH]path:::old|||new[/TOOL]
|
|
669
|
+
- [TOOL:SHELL]command[/TOOL]`
|
|
651
670
|
});
|
|
652
671
|
|
|
653
672
|
// 5. Save to context file so it persists
|