@probelabs/probe 0.6.0-rc277 → 0.6.0-rc278
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/bin/binaries/probe-v0.6.0-rc278-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/{probe-v0.6.0-rc277-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc278-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/probe-v0.6.0-rc278-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc278-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc278-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/ProbeAgent.js +0 -9
- package/build/agent/index.js +31 -20
- package/build/agent/shared/prompts.js +30 -8
- package/cjs/agent/ProbeAgent.cjs +31 -20
- package/cjs/index.cjs +31 -20
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +0 -9
- package/src/agent/shared/prompts.js +30 -8
- package/bin/binaries/probe-v0.6.0-rc277-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc277-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc277-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc277-x86_64-unknown-linux-musl.tar.gz +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -104,7 +104,6 @@ import {
|
|
|
104
104
|
TaskManager,
|
|
105
105
|
createTaskTool,
|
|
106
106
|
taskSystemPrompt,
|
|
107
|
-
taskGuidancePrompt,
|
|
108
107
|
createTaskCompletionBlockedMessage
|
|
109
108
|
} from './tasks/index.js';
|
|
110
109
|
import { z } from 'zod';
|
|
@@ -3153,14 +3152,6 @@ Follow these instructions carefully:
|
|
|
3153
3152
|
// Create user message with optional image support
|
|
3154
3153
|
let userMessage = { role: 'user', content: message.trim() };
|
|
3155
3154
|
|
|
3156
|
-
// START CHECKPOINT: Inject task guidance if tasks are enabled
|
|
3157
|
-
if (this.enableTasks) {
|
|
3158
|
-
userMessage.content = userMessage.content + '\n\n' + taskGuidancePrompt;
|
|
3159
|
-
if (this.debug) {
|
|
3160
|
-
console.log('[DEBUG] Task guidance injected into user message');
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
3155
|
// If schema is provided, prepend JSON format requirement to user message
|
|
3165
3156
|
if (options.schema && !options._schemaFormatted) {
|
|
3166
3157
|
const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
|
package/build/agent/index.js
CHANGED
|
@@ -31932,7 +31932,7 @@ ${taskManager.formatTasksForPrompt()}`;
|
|
|
31932
31932
|
}
|
|
31933
31933
|
};
|
|
31934
31934
|
}
|
|
31935
|
-
var taskItemSchema, taskSchema, taskSystemPrompt
|
|
31935
|
+
var taskItemSchema, taskSchema, taskSystemPrompt;
|
|
31936
31936
|
var init_taskTool = __esm({
|
|
31937
31937
|
"src/agent/tasks/taskTool.js"() {
|
|
31938
31938
|
"use strict";
|
|
@@ -31993,11 +31993,6 @@ Tasks = logical units of work, not files or steps.
|
|
|
31993
31993
|
- Circular dependencies are rejected
|
|
31994
31994
|
- attempt_completion is blocked while tasks remain unresolved
|
|
31995
31995
|
`;
|
|
31996
|
-
taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
|
|
31997
|
-
- "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
|
|
31998
|
-
- "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
|
|
31999
|
-
Multiple internal steps for ONE goal = NO tasks needed.
|
|
32000
|
-
If creating tasks, use the task tool with action="create" first.`;
|
|
32001
31996
|
}
|
|
32002
31997
|
});
|
|
32003
31998
|
|
|
@@ -70753,8 +70748,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
70753
70748
|
- Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
|
|
70754
70749
|
|
|
70755
70750
|
# Task Planning
|
|
70756
|
-
|
|
70757
|
-
-
|
|
70751
|
+
When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
|
|
70752
|
+
- Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
|
|
70753
|
+
- Update task status to "in_progress" when starting and "completed" when done.
|
|
70754
|
+
- All tasks must be completed or cancelled before calling attempt_completion.
|
|
70755
|
+
- Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
|
|
70756
|
+
|
|
70757
|
+
Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
|
|
70758
|
+
|
|
70759
|
+
# Discovering Project Commands
|
|
70760
|
+
Before building or testing, determine the project's toolchain:
|
|
70761
|
+
- Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
|
|
70762
|
+
- Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
|
|
70763
|
+
- Read README for build/test instructions if the above are unclear
|
|
70764
|
+
- Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
|
|
70758
70765
|
|
|
70759
70766
|
# During Implementation
|
|
70760
70767
|
- Always create a new branch before making changes to the codebase.
|
|
@@ -70765,12 +70772,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
70765
70772
|
- When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
|
|
70766
70773
|
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
70767
70774
|
|
|
70768
|
-
#
|
|
70769
|
-
|
|
70770
|
-
-
|
|
70771
|
-
-
|
|
70772
|
-
-
|
|
70773
|
-
-
|
|
70775
|
+
# Writing Tests
|
|
70776
|
+
Every change must include tests. Before writing them:
|
|
70777
|
+
- Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
|
|
70778
|
+
- Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
|
|
70779
|
+
- Prefer extending an existing test file over creating a new one when your change is in the same module.
|
|
70780
|
+
- Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
|
|
70781
|
+
- When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
|
|
70782
|
+
|
|
70783
|
+
# Verify Changes
|
|
70784
|
+
Before committing or creating a PR, run through this checklist:
|
|
70785
|
+
1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
|
|
70786
|
+
2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
|
|
70787
|
+
3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
|
|
70788
|
+
4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
|
|
70789
|
+
|
|
70790
|
+
Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
|
|
70774
70791
|
|
|
70775
70792
|
# GitHub Integration
|
|
70776
70793
|
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
|
@@ -84229,12 +84246,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
|
|
|
84229
84246
|
});
|
|
84230
84247
|
const systemMessage = await this.getSystemMessage();
|
|
84231
84248
|
let userMessage = { role: "user", content: message.trim() };
|
|
84232
|
-
if (this.enableTasks) {
|
|
84233
|
-
userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
|
|
84234
|
-
if (this.debug) {
|
|
84235
|
-
console.log("[DEBUG] Task guidance injected into user message");
|
|
84236
|
-
}
|
|
84237
|
-
}
|
|
84238
84249
|
if (options.schema && !options._schemaFormatted) {
|
|
84239
84250
|
const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
|
|
84240
84251
|
userMessage.content = message.trim() + schemaInstructions;
|
|
@@ -81,8 +81,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
81
81
|
- Check imports and existing utilities before creating new helpers — the project may already have what you need.
|
|
82
82
|
|
|
83
83
|
# Task Planning
|
|
84
|
-
|
|
85
|
-
-
|
|
84
|
+
When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
|
|
85
|
+
- Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
|
|
86
|
+
- Update task status to "in_progress" when starting and "completed" when done.
|
|
87
|
+
- All tasks must be completed or cancelled before calling attempt_completion.
|
|
88
|
+
- Stay flexible — add, remove, or reorganize tasks as your understanding changes.
|
|
89
|
+
|
|
90
|
+
Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
|
|
91
|
+
|
|
92
|
+
# Discovering Project Commands
|
|
93
|
+
Before building or testing, determine the project's toolchain:
|
|
94
|
+
- Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
|
|
95
|
+
- Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
|
|
96
|
+
- Read README for build/test instructions if the above are unclear
|
|
97
|
+
- Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
|
|
86
98
|
|
|
87
99
|
# During Implementation
|
|
88
100
|
- Always create a new branch before making changes to the codebase.
|
|
@@ -93,12 +105,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
93
105
|
- When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) — it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
|
|
94
106
|
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
95
107
|
|
|
96
|
-
#
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
108
|
+
# Writing Tests
|
|
109
|
+
Every change must include tests. Before writing them:
|
|
110
|
+
- Find existing test files for the module you changed — look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
|
|
111
|
+
- Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
|
|
112
|
+
- Prefer extending an existing test file over creating a new one when your change is in the same module.
|
|
113
|
+
- Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
|
|
114
|
+
- When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
|
|
115
|
+
|
|
116
|
+
# Verify Changes
|
|
117
|
+
Before committing or creating a PR, run through this checklist:
|
|
118
|
+
1. **Build** — run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
|
|
119
|
+
2. **Lint & typecheck** — run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
|
|
120
|
+
3. **Test** — run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
|
|
121
|
+
4. **Review** — re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
|
|
122
|
+
|
|
123
|
+
Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
|
|
102
124
|
|
|
103
125
|
# GitHub Integration
|
|
104
126
|
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -58878,7 +58878,7 @@ ${taskManager.formatTasksForPrompt()}`;
|
|
|
58878
58878
|
}
|
|
58879
58879
|
};
|
|
58880
58880
|
}
|
|
58881
|
-
var taskItemSchema, taskSchema, taskSystemPrompt
|
|
58881
|
+
var taskItemSchema, taskSchema, taskSystemPrompt;
|
|
58882
58882
|
var init_taskTool = __esm({
|
|
58883
58883
|
"src/agent/tasks/taskTool.js"() {
|
|
58884
58884
|
"use strict";
|
|
@@ -58939,11 +58939,6 @@ Tasks = logical units of work, not files or steps.
|
|
|
58939
58939
|
- Circular dependencies are rejected
|
|
58940
58940
|
- attempt_completion is blocked while tasks remain unresolved
|
|
58941
58941
|
`;
|
|
58942
|
-
taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
|
|
58943
|
-
- "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
|
|
58944
|
-
- "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
|
|
58945
|
-
Multiple internal steps for ONE goal = NO tasks needed.
|
|
58946
|
-
If creating tasks, use the task tool with action="create" first.`;
|
|
58947
58942
|
}
|
|
58948
58943
|
});
|
|
58949
58944
|
|
|
@@ -97700,8 +97695,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
97700
97695
|
- Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
|
|
97701
97696
|
|
|
97702
97697
|
# Task Planning
|
|
97703
|
-
|
|
97704
|
-
-
|
|
97698
|
+
When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
|
|
97699
|
+
- Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
|
|
97700
|
+
- Update task status to "in_progress" when starting and "completed" when done.
|
|
97701
|
+
- All tasks must be completed or cancelled before calling attempt_completion.
|
|
97702
|
+
- Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
|
|
97703
|
+
|
|
97704
|
+
Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
|
|
97705
|
+
|
|
97706
|
+
# Discovering Project Commands
|
|
97707
|
+
Before building or testing, determine the project's toolchain:
|
|
97708
|
+
- Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
|
|
97709
|
+
- Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
|
|
97710
|
+
- Read README for build/test instructions if the above are unclear
|
|
97711
|
+
- Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
|
|
97705
97712
|
|
|
97706
97713
|
# During Implementation
|
|
97707
97714
|
- Always create a new branch before making changes to the codebase.
|
|
@@ -97712,12 +97719,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
97712
97719
|
- When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
|
|
97713
97720
|
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
97714
97721
|
|
|
97715
|
-
#
|
|
97716
|
-
|
|
97717
|
-
-
|
|
97718
|
-
-
|
|
97719
|
-
-
|
|
97720
|
-
-
|
|
97722
|
+
# Writing Tests
|
|
97723
|
+
Every change must include tests. Before writing them:
|
|
97724
|
+
- Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
|
|
97725
|
+
- Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
|
|
97726
|
+
- Prefer extending an existing test file over creating a new one when your change is in the same module.
|
|
97727
|
+
- Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
|
|
97728
|
+
- When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
|
|
97729
|
+
|
|
97730
|
+
# Verify Changes
|
|
97731
|
+
Before committing or creating a PR, run through this checklist:
|
|
97732
|
+
1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
|
|
97733
|
+
2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
|
|
97734
|
+
3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
|
|
97735
|
+
4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
|
|
97736
|
+
|
|
97737
|
+
Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
|
|
97721
97738
|
|
|
97722
97739
|
# GitHub Integration
|
|
97723
97740
|
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
|
@@ -111175,12 +111192,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
|
|
|
111175
111192
|
});
|
|
111176
111193
|
const systemMessage = await this.getSystemMessage();
|
|
111177
111194
|
let userMessage = { role: "user", content: message.trim() };
|
|
111178
|
-
if (this.enableTasks) {
|
|
111179
|
-
userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
|
|
111180
|
-
if (this.debug) {
|
|
111181
|
-
console.log("[DEBUG] Task guidance injected into user message");
|
|
111182
|
-
}
|
|
111183
|
-
}
|
|
111184
111195
|
if (options.schema && !options._schemaFormatted) {
|
|
111185
111196
|
const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
|
|
111186
111197
|
userMessage.content = message.trim() + schemaInstructions;
|
package/cjs/index.cjs
CHANGED
|
@@ -36120,7 +36120,7 @@ ${taskManager.formatTasksForPrompt()}`;
|
|
|
36120
36120
|
}
|
|
36121
36121
|
};
|
|
36122
36122
|
}
|
|
36123
|
-
var taskItemSchema, taskSchema, taskSystemPrompt
|
|
36123
|
+
var taskItemSchema, taskSchema, taskSystemPrompt;
|
|
36124
36124
|
var init_taskTool = __esm({
|
|
36125
36125
|
"src/agent/tasks/taskTool.js"() {
|
|
36126
36126
|
"use strict";
|
|
@@ -36181,11 +36181,6 @@ Tasks = logical units of work, not files or steps.
|
|
|
36181
36181
|
- Circular dependencies are rejected
|
|
36182
36182
|
- attempt_completion is blocked while tasks remain unresolved
|
|
36183
36183
|
`;
|
|
36184
|
-
taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
|
|
36185
|
-
- "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
|
|
36186
|
-
- "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
|
|
36187
|
-
Multiple internal steps for ONE goal = NO tasks needed.
|
|
36188
|
-
If creating tasks, use the task tool with action="create" first.`;
|
|
36189
36184
|
}
|
|
36190
36185
|
});
|
|
36191
36186
|
|
|
@@ -82671,8 +82666,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
82671
82666
|
- Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
|
|
82672
82667
|
|
|
82673
82668
|
# Task Planning
|
|
82674
|
-
|
|
82675
|
-
-
|
|
82669
|
+
When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
|
|
82670
|
+
- Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
|
|
82671
|
+
- Update task status to "in_progress" when starting and "completed" when done.
|
|
82672
|
+
- All tasks must be completed or cancelled before calling attempt_completion.
|
|
82673
|
+
- Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
|
|
82674
|
+
|
|
82675
|
+
Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
|
|
82676
|
+
|
|
82677
|
+
# Discovering Project Commands
|
|
82678
|
+
Before building or testing, determine the project's toolchain:
|
|
82679
|
+
- Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
|
|
82680
|
+
- Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
|
|
82681
|
+
- Read README for build/test instructions if the above are unclear
|
|
82682
|
+
- Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
|
|
82676
82683
|
|
|
82677
82684
|
# During Implementation
|
|
82678
82685
|
- Always create a new branch before making changes to the codebase.
|
|
@@ -82683,12 +82690,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
82683
82690
|
- When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
|
|
82684
82691
|
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
82685
82692
|
|
|
82686
|
-
#
|
|
82687
|
-
|
|
82688
|
-
-
|
|
82689
|
-
-
|
|
82690
|
-
-
|
|
82691
|
-
-
|
|
82693
|
+
# Writing Tests
|
|
82694
|
+
Every change must include tests. Before writing them:
|
|
82695
|
+
- Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
|
|
82696
|
+
- Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
|
|
82697
|
+
- Prefer extending an existing test file over creating a new one when your change is in the same module.
|
|
82698
|
+
- Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
|
|
82699
|
+
- When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
|
|
82700
|
+
|
|
82701
|
+
# Verify Changes
|
|
82702
|
+
Before committing or creating a PR, run through this checklist:
|
|
82703
|
+
1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
|
|
82704
|
+
2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
|
|
82705
|
+
3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
|
|
82706
|
+
4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
|
|
82707
|
+
|
|
82708
|
+
Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
|
|
82692
82709
|
|
|
82693
82710
|
# GitHub Integration
|
|
82694
82711
|
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
|
@@ -108426,12 +108443,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
|
|
|
108426
108443
|
});
|
|
108427
108444
|
const systemMessage = await this.getSystemMessage();
|
|
108428
108445
|
let userMessage = { role: "user", content: message.trim() };
|
|
108429
|
-
if (this.enableTasks) {
|
|
108430
|
-
userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
|
|
108431
|
-
if (this.debug) {
|
|
108432
|
-
console.log("[DEBUG] Task guidance injected into user message");
|
|
108433
|
-
}
|
|
108434
|
-
}
|
|
108435
108446
|
if (options.schema && !options._schemaFormatted) {
|
|
108436
108447
|
const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
|
|
108437
108448
|
userMessage.content = message.trim() + schemaInstructions;
|
package/package.json
CHANGED
package/src/agent/ProbeAgent.js
CHANGED
|
@@ -104,7 +104,6 @@ import {
|
|
|
104
104
|
TaskManager,
|
|
105
105
|
createTaskTool,
|
|
106
106
|
taskSystemPrompt,
|
|
107
|
-
taskGuidancePrompt,
|
|
108
107
|
createTaskCompletionBlockedMessage
|
|
109
108
|
} from './tasks/index.js';
|
|
110
109
|
import { z } from 'zod';
|
|
@@ -3153,14 +3152,6 @@ Follow these instructions carefully:
|
|
|
3153
3152
|
// Create user message with optional image support
|
|
3154
3153
|
let userMessage = { role: 'user', content: message.trim() };
|
|
3155
3154
|
|
|
3156
|
-
// START CHECKPOINT: Inject task guidance if tasks are enabled
|
|
3157
|
-
if (this.enableTasks) {
|
|
3158
|
-
userMessage.content = userMessage.content + '\n\n' + taskGuidancePrompt;
|
|
3159
|
-
if (this.debug) {
|
|
3160
|
-
console.log('[DEBUG] Task guidance injected into user message');
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
3155
|
// If schema is provided, prepend JSON format requirement to user message
|
|
3165
3156
|
if (options.schema && !options._schemaFormatted) {
|
|
3166
3157
|
const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
|
|
@@ -81,8 +81,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
81
81
|
- Check imports and existing utilities before creating new helpers — the project may already have what you need.
|
|
82
82
|
|
|
83
83
|
# Task Planning
|
|
84
|
-
|
|
85
|
-
-
|
|
84
|
+
When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
|
|
85
|
+
- Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
|
|
86
|
+
- Update task status to "in_progress" when starting and "completed" when done.
|
|
87
|
+
- All tasks must be completed or cancelled before calling attempt_completion.
|
|
88
|
+
- Stay flexible — add, remove, or reorganize tasks as your understanding changes.
|
|
89
|
+
|
|
90
|
+
Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
|
|
91
|
+
|
|
92
|
+
# Discovering Project Commands
|
|
93
|
+
Before building or testing, determine the project's toolchain:
|
|
94
|
+
- Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
|
|
95
|
+
- Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
|
|
96
|
+
- Read README for build/test instructions if the above are unclear
|
|
97
|
+
- Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
|
|
86
98
|
|
|
87
99
|
# During Implementation
|
|
88
100
|
- Always create a new branch before making changes to the codebase.
|
|
@@ -93,12 +105,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
|
|
|
93
105
|
- When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) — it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
|
|
94
106
|
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
95
107
|
|
|
96
|
-
#
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
108
|
+
# Writing Tests
|
|
109
|
+
Every change must include tests. Before writing them:
|
|
110
|
+
- Find existing test files for the module you changed — look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
|
|
111
|
+
- Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
|
|
112
|
+
- Prefer extending an existing test file over creating a new one when your change is in the same module.
|
|
113
|
+
- Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
|
|
114
|
+
- When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
|
|
115
|
+
|
|
116
|
+
# Verify Changes
|
|
117
|
+
Before committing or creating a PR, run through this checklist:
|
|
118
|
+
1. **Build** — run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
|
|
119
|
+
2. **Lint & typecheck** — run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
|
|
120
|
+
3. **Test** — run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
|
|
121
|
+
4. **Review** — re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
|
|
122
|
+
|
|
123
|
+
Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
|
|
102
124
|
|
|
103
125
|
# GitHub Integration
|
|
104
126
|
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|