Skip to content

Commit 7991aae

Browse files
committed
Spread skill tools across build, docs, review, and orchestrator surfaces
1 parent 92a5657 commit 7991aae

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

‎src/agent/directors/tool-sets.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
READ_TOOLS,
88
REVIEW_TOOLS,
99
INTERN_TOOLS,
10+
SKILL_TOOLS,
1011
SKYWALKER_TOOLS,
1112
} from "./tool-sets.js";
1213

@@ -92,7 +93,8 @@ describe("SKYWALKER_TOOLS / ORCHESTRATOR_TOOLS", () => {
9293
);
9394
});
9495

95-
test("skill_search + use_skill mount on every worker surface", () => {
96+
test("skill_search + use_skill mount on every worker surface, never ask_operator", () => {
97+
expect([...SKILL_TOOLS]).toEqual(["skill_search", "use_skill"]);
9698
for (const surface of [
9799
READ_TOOLS,
98100
BUILD_TOOLS,
@@ -104,6 +106,7 @@ describe("SKYWALKER_TOOLS / ORCHESTRATOR_TOOLS", () => {
104106
] as const) {
105107
expect(surface as readonly string[]).toContain("skill_search");
106108
expect(surface as readonly string[]).toContain("use_skill");
109+
expect(surface as readonly string[]).not.toContain("ask_operator");
107110
}
108111
});
109112
});

‎src/agent/directors/tool-sets.ts‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
// Small, explicit tool allowlists for director packages.
22
// Prefer tools.allow at mount (CapabilityFilter include) over huge deny lists.
33
// manage_tasks is always mounted by runSubAgent after the filter — omit it here.
4-
// skill_search + use_skill mount on every worker through runSubAgent (scoped to
5-
// the dispatch's optionalSkills); they ride the allowlists below so the
6-
// capability filter keeps them. ask_operator stays primary-only.
4+
// skill_search + use_skill mount on every worker, scoped at mount to the
5+
// dispatch's optionalSkills. ask_operator stays primary-session-only: workers
6+
// never mount it (Do not #1).
77

8-
/**
9-
* Skill discovery/loading, mounted on every worker surface (read/build/docs/
10-
* review/intern/orchestrator). runSubAgent scopes both tools to the
11-
* dispatch's optionalSkills before the capability filter.
12-
*/
8+
/** Skill discovery + loading — mounted on every worker surface below. */
139
export const SKILL_TOOLS = ["skill_search", "use_skill"] as const;
1410

15-
/** Read/search/shell — no product mutation. */
11+
/** Read/search/shell + skill tools — no product mutation. */
1612
export const READ_TOOLS = [
1713
"read_file",
1814
"grep",
@@ -46,6 +42,7 @@ export const PRODUCT_WRITE_TOOLS = [
4642
export const BUILD_TOOLS = [
4743
...READ_TOOLS,
4844
...PRODUCT_WRITE_TOOLS,
45+
...SKILL_TOOLS,
4946
"apply_patch",
5047
"shell",
5148
"update_plan",
@@ -65,12 +62,17 @@ export const BUILD_TOOLS = [
6562
export const DOCS_TOOLS = [
6663
...READ_TOOLS.filter((t) => t !== "run_shell" && t !== "shell_collect"),
6764
...PRODUCT_WRITE_TOOLS,
65+
...SKILL_TOOLS,
6866
"apply_patch",
6967
"update_plan",
7068
] as const;
7169

72-
/** Review / counsel: read surface + path writes (lane discipline in prompts). */
73-
export const REVIEW_TOOLS = [...READ_TOOLS, ...PRODUCT_WRITE_TOOLS] as const;
70+
/** Review / counsel: read surface + path writes + skill tools (lane discipline in prompts). */
71+
export const REVIEW_TOOLS = [
72+
...READ_TOOLS,
73+
...PRODUCT_WRITE_TOOLS,
74+
...SKILL_TOOLS,
75+
] as const;
7476

7577
/** Mechanical intern: shell-first + path writes when the brief requires them. */
7678
export const INTERN_TOOLS = [
@@ -90,6 +92,7 @@ export const INTERN_TOOLS = [
9092
export const ORCHESTRATOR_TOOLS = [
9193
...READ_TOOLS,
9294
...PRODUCT_WRITE_TOOLS,
95+
...SKILL_TOOLS,
9396
"spawn_agent",
9497
"list_agents",
9598
"close_agent",

‎src/agent/tool-classification.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ describe("AUTO_ALLOW_READ_TOOLS", () => {
1818
"manage_tasks",
1919
"read_file",
2020
"search_files",
21+
// CL-7668: read-only skill discovery/loading needs no approval prompt.
22+
"skill_search",
23+
"use_skill",
2124
].sort(),
2225
);
2326
});

0 commit comments

Comments
 (0)