Reduce the prompt changes.

This commit is contained in:
Christian Gunderman
2026-01-28 21:30:31 -08:00
parent 866336dafb
commit f35b67fd47

View File

@@ -135,7 +135,6 @@ export function renderCoreMandates(options?: CoreMandatesOptions): string {
return `
# Core Mandates
- **Context Efficiency:** Minimize context usage. Do not read entire files unless necessary. Use 'search_file_content' or 'read_file' with 'limit' to inspect large files.
- **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.
- **Libraries/Frameworks:** NEVER assume a library/framework is available or appropriate. Verify its established usage within the project (check imports, configuration files like 'package.json', 'Cargo.toml', 'requirements.txt', 'build.gradle', etc., or observe neighboring files) before employing it.
- **Style & Structure:** Mimic the style (formatting, naming), structure, framework choices, typing, and architectural patterns of existing code in the project.
@@ -368,15 +367,10 @@ function mandateContinueWork(interactive: boolean): string {
function workflowStepUnderstand(options: PrimaryWorkflowsOptions): string {
if (options.enableCodebaseInvestigator) {
return `1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary action** must be to delegate to the 'codebase_investigator' agent using the 'codebase_investigator' tool. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.
Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have.
IMPORTANT: extra context consumed by unnecessarily reading entire files will degrade the quality of your answer, so **ALWAYS** use ranged reads if you know approximately which lines you need. For example, when fixing a linter error at line 50, read ~20 lines around it (offset: 40, limit: 20) to get sufficient context for a replacement.`;
return `1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary action** must be to delegate to the 'codebase_investigator' agent using the 'codebase_investigator' tool. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.`;
}
return `1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have. If you need to read multiple files, you should make multiple parallel calls to '${READ_FILE_TOOL_NAME}'.
Keep in mind the following as you explore:
- Search and/or read enough files to gain a thorough understanding of the problem.
- IMPORTANT: extra context consumed by unnecessarily reading entire files will degrade the quality of your answer, so **ALWAYS** use ranged reads if you know approximately which lines you need. For example, when fixing a linter error at line 50, read ~20 lines around it (offset: 40, limit: 20) to get sufficient context for a replacement.`;
Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have. If you need to read multiple files, you should make multiple parallel calls to '${READ_FILE_TOOL_NAME}'.`;
}
function workflowStepPlan(options: PrimaryWorkflowsOptions): string {