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. */
139export 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. */
1612export const READ_TOOLS = [
1713 "read_file" ,
1814 "grep" ,
@@ -46,6 +42,7 @@ export const PRODUCT_WRITE_TOOLS = [
4642export 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 = [
6562export 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. */
7678export const INTERN_TOOLS = [
@@ -90,6 +92,7 @@ export const INTERN_TOOLS = [
9092export const ORCHESTRATOR_TOOLS = [
9193 ...READ_TOOLS ,
9294 ...PRODUCT_WRITE_TOOLS ,
95+ ...SKILL_TOOLS ,
9396 "spawn_agent" ,
9497 "list_agents" ,
9598 "close_agent" ,
0 commit comments