You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: move shell efficiency guidelines to tool description
- Relocates Quiet Flags and Pagination instructions from the general system prompt to the 'run_shell_command' tool declaration.
- Ensures efficiency guidelines are provided contextually when the model considers shell tool use.
- Retains guidelines in legacy snippets for backward compatibility with older models.
- Adds comprehensive behavioral evaluations in 'evals/shell-efficiency.eval.ts' to verify adherence to efficiency best practices and respect for the 'enableShellOutputEfficiency' setting.
Copy file name to clipboardExpand all lines: packages/core/src/core/__snapshots__/prompts.test.ts.snap
-55Lines changed: 0 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -592,11 +592,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
592
592
593
593
# Operational Guidelines
594
594
595
-
## Shell Tool Efficiency
596
-
597
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
598
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
599
-
600
595
## Tone and Style
601
596
602
597
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -706,11 +701,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
706
701
707
702
# Operational Guidelines
708
703
709
-
## Shell Tool Efficiency
710
-
711
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
712
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
713
-
714
704
## Tone and Style
715
705
716
706
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -803,11 +793,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
803
793
804
794
# Operational Guidelines
805
795
806
-
## Shell Tool Efficiency
807
-
808
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
809
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
810
-
811
796
## Tone and Style
812
797
813
798
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -1391,11 +1376,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
1391
1376
1392
1377
# Operational Guidelines
1393
1378
1394
-
## Shell Tool Efficiency
1395
-
1396
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
1397
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
1398
-
1399
1379
## Tone and Style
1400
1380
1401
1381
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -1514,11 +1494,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
1514
1494
1515
1495
# Operational Guidelines
1516
1496
1517
-
## Shell Tool Efficiency
1518
-
1519
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
1520
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
1521
-
1522
1497
## Tone and Style
1523
1498
1524
1499
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -1637,11 +1612,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
1637
1612
1638
1613
# Operational Guidelines
1639
1614
1640
-
## Shell Tool Efficiency
1641
-
1642
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
1643
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
1644
-
1645
1615
## Tone and Style
1646
1616
1647
1617
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -1868,11 +1838,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
1868
1838
1869
1839
# Operational Guidelines
1870
1840
1871
-
## Shell Tool Efficiency
1872
-
1873
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
1874
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
1875
-
1876
1841
## Tone and Style
1877
1842
1878
1843
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -2099,11 +2064,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
2099
2064
2100
2065
# Operational Guidelines
2101
2066
2102
-
## Shell Tool Efficiency
2103
-
2104
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
2105
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
2106
-
2107
2067
## Tone and Style
2108
2068
2109
2069
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -2218,11 +2178,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
2218
2178
2219
2179
# Operational Guidelines
2220
2180
2221
-
## Shell Tool Efficiency
2222
-
2223
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
2224
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
2225
-
2226
2181
## Tone and Style
2227
2182
2228
2183
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -2448,11 +2403,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
2448
2403
2449
2404
# Operational Guidelines
2450
2405
2451
-
## Shell Tool Efficiency
2452
-
2453
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
2454
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
2455
-
2456
2406
## Tone and Style
2457
2407
2458
2408
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -2567,11 +2517,6 @@ Operate using a **Research -> Strategy -> Execution** lifecycle. For the Executi
2567
2517
2568
2518
# Operational Guidelines
2569
2519
2570
-
## Shell Tool Efficiency
2571
-
2572
-
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
2573
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
2574
-
2575
2520
## Tone and Style
2576
2521
2577
2522
- **Role:** A senior software engineer and collaborative peer programmer.
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
526
-
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).`;
Copy file name to clipboardExpand all lines: packages/core/src/tools/__snapshots__/shell.test.ts.snap
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@
3
3
exports[`ShellTool > getDescription > should return the non-windows description when not on windows 1`] =`
4
4
"This tool executes a given shell command as \`bash -c <command>\`. Command can start background processes using \`&\`. Command is executed as a subprocess that leads its own process group. Command process group can be terminated as \`kill -- -PGID\` or signaled as \`kill -s SIGNAL -- -PGID\`.
5
5
6
+
Efficiency Guidelines:
7
+
- Quiet Flags: Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
8
+
- Pagination: Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
9
+
6
10
The following information is returned:
7
11
8
12
Output: Combined stdout/stderr. Can be \`(empty)\` or partial on error and for any unwaited background processes.
@@ -16,6 +20,10 @@ exports[`ShellTool > getDescription > should return the non-windows description
16
20
exports[`ShellTool > getDescription > should return the windows description when on windows 1`] = `
17
21
"This tool executes a given shell command as \`powershell.exe -NoProfile -Command <command>\`. Command can start background processes using PowerShell constructs such as \`Start-Process -NoNewWindow\` or \`Start-Job\`.
18
22
23
+
Efficiency Guidelines:
24
+
- Quiet Flags: Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
25
+
- Pagination: Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).
26
+
19
27
The following information is returned:
20
28
21
29
Output: Combined stdout/stderr. Can be \`(empty)\` or partial on error and for any unwaited background processes.
0 commit comments