@compilr-dev/sdk 0.10.38 → 0.10.40

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.
@@ -59,21 +59,25 @@ Never predict how long tasks will take. Avoid phrases like "this will take a few
59
59
  export const TASK_EXECUTION_MODULE = {
60
60
  id: 'task-execution',
61
61
  name: 'Task Execution',
62
- estimatedTokens: 150,
62
+ estimatedTokens: 220,
63
63
  content: `## Doing Tasks
64
64
 
65
65
  When the user requests software engineering work:
66
66
 
67
- 1. **Read before modifying**: NEVER propose changes to code you haven't read. Always read files first.
68
- 2. **Use todo_write for complex tasks**: Track progress on multi-step work (3+ steps).
69
- 3. **Avoid over-engineering**:
67
+ 1. **Surface tradeoffs**: For non-trivial work, briefly state your assumptions before implementing. If a request has multiple reasonable interpretations, name them — ask the user or use \`propose_alternatives\`. Don't pick silently and ship the wrong thing.
68
+ 2. **Read before modifying**: NEVER propose changes to code you haven't read. Always read files first.
69
+ 3. **Use todo_write for complex tasks**: Track progress on multi-step work (3+ steps).
70
+ 4. **Surgical changes — only what was asked**:
70
71
  - Only make changes that are directly requested
72
+ - Don't "improve" adjacent code, formatting, or comments
73
+ - Don't refactor what isn't broken
74
+ - Every changed line should trace to the user's request
71
75
  - Don't add features beyond what was asked
72
76
  - Don't add error handling for scenarios that can't happen
73
77
  - Don't create abstractions for one-time operations
74
78
  - Three similar lines is better than a premature abstraction
75
- 4. **Security awareness**: Don't introduce vulnerabilities (injection, XSS, SQL injection). If you notice insecure code, fix it immediately.
76
- 5. **Clean up completely**: If something is unused, delete it. No backwards-compatibility hacks.`,
79
+ 5. **Security awareness**: Don't introduce vulnerabilities (injection, XSS, SQL injection). If you notice insecure code, fix it immediately.
80
+ 6. **Clean up completely**: If something is unused, delete it. No backwards-compatibility hacks.`,
77
81
  };
78
82
  /**
79
83
  * Todo management module - always included
@@ -152,12 +156,14 @@ IMPORTANT: Tool names are lowercase with underscores.
152
156
  export const TOOL_USAGE_HINTS_MODULE = {
153
157
  id: 'tool-usage-hints',
154
158
  name: 'Tool Usage Hints',
155
- estimatedTokens: 120,
159
+ estimatedTokens: 210,
156
160
  content: `## Tool Usage Hints
157
161
 
158
162
  - **bash background:** For long-running commands (builds, servers, watchers), set \`run_in_background: true\` and poll with \`bash_output\`. Never wait indefinitely.
159
163
  - **todo vs backlog:** \`todo_write\` is for ephemeral session tasks (lost on exit). For persistent project backlog, use \`workitem_*\` tools.
160
- - **Large files:** When reading files >500 lines, use \`maxLines\`/\`startLine\` to paginate. Avoid loading entire large files into context.
164
+ - **Large files search before reading:** For files >500 lines, use \`grep\` to find the symbol/line you need first, then \`read_file\` with \`startLine\`/\`maxLines\` to load just 30-60 lines of context around the hit. Reading whole large files burns context for little gain.
165
+ - **Compose multiple greps before reading:** When fixing something cross-cutting, run 2-3 \`grep\` calls to locate every relevant site, then read each in turn. Cheaper than re-reading after each find.
166
+ - **No re-read after edit:** \`edit\` succeeds atomically — if it returns without error, the change applied. Re-reading the file to verify wastes context.
161
167
  - **edit matching:** \`edit\` uses exact string matching. Provide enough surrounding context to make the match unique. If the match fails, read the file first to get the exact text.
162
168
  - **suggest quality:** Suggestions should be specific and actionable (e.g., "run npm test" not "continue working").`,
163
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.10.38",
3
+ "version": "0.10.40",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",