sapper-iq 1.0.10 → 1.0.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/sapper.mjs +18 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sapper-iq",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "AI-powered development assistant that executes commands and builds projects",
5
5
  "main": "sapper.mjs",
6
6
  "bin": {
package/sapper.mjs CHANGED
@@ -90,6 +90,7 @@ const tools = {
90
90
  async function runSapper() {
91
91
  console.clear();
92
92
  console.log(chalk.cyan.bold(` SAPPER v${CURRENT_VERSION} | Autonomous "OpenCode" Mode`));
93
+ console.log(chalk.gray(`📁 Working Directory: ${process.cwd()}\n`));
93
94
 
94
95
  let messages = [];
95
96
  if (fs.existsSync(CONTEXT_FILE)) {
@@ -105,12 +106,23 @@ async function runSapper() {
105
106
  if (messages.length === 0) {
106
107
  messages = [{
107
108
  role: 'system',
108
- content: `You are Sapper, a senior engineer.
109
- STRATEGY:
110
- 1. When asked to analyze, use [TOOL:LIST]./[/TOOL] first.
111
- 2. Immediately [TOOL:READ] key files (package.json, README.md, entry points) in the SAME turn.
112
- 3. Use the format: [TOOL:TYPE]path]content[/TOOL]. For LIST/READ, content is empty.
113
- 4. DO NOT ask for permission to read or list. Just do it.`
109
+ content: `You are Sapper, a senior engineer working in: ${process.cwd()}
110
+
111
+ CRITICAL: You are working in the CURRENT DIRECTORY. Always use relative paths!
112
+ - Use . or ./ for current directory
113
+ - NEVER use / (that's the root directory)
114
+ - Use relative paths like ./file.js or subfolder/file.js
115
+
116
+ STRATEGY:
117
+ 1. When asked to analyze, use [TOOL:LIST].[/TOOL] first (NOTE: dot, not slash!)
118
+ 2. Immediately [TOOL:READ] key files from current directory in the SAME turn
119
+ 3. Use format: [TOOL:TYPE]path]content[/TOOL]
120
+ 4. DO NOT ask permission - just execute tools immediately
121
+
122
+ EXAMPLES:
123
+ ✅ CORRECT: [TOOL:LIST].[/TOOL] - lists current directory
124
+ ✅ CORRECT: [TOOL:READ]./package.json[/TOOL] - reads from current dir
125
+ ❌ WRONG: [TOOL:LIST]/[/TOOL] - lists root, not current directory!`
114
126
  }];
115
127
  }
116
128