|
1 | | -import type { DirectorPackage } from "../types.js"; |
2 | | -import { READ_TOOLS } from "../tool-sets.js"; |
3 | | - |
4 | 1 | /** |
5 | 2 | * Explorer worker (CL-7020 / CL-7015 rename from explore). |
6 | 3 | * Map/read against the brief — scannable findings only; never implement, review, or discover the fleet. |
| 4 | + * |
| 5 | + * Ships as the @corbits/agent-explorer workspace package: the tool allowlist |
| 6 | + * lives here so the package stays importable without the app. Drift against |
| 7 | + * the app read surface fails src/agent/directors/explorer/package.test.ts. |
7 | 8 | */ |
8 | | -export const explorerPackage: DirectorPackage = { |
| 9 | +export type AgentPackage = { |
| 10 | + readonly id: "explorer"; |
| 11 | + readonly primaryIntent: string; |
| 12 | + readonly outOfLane: readonly string[]; |
| 13 | + readonly description: string; |
| 14 | + readonly systemPrompt: string; |
| 15 | + /** Unset — explorer never attaches skill bodies at spawn. */ |
| 16 | + readonly attachedSkills?: readonly string[]; |
| 17 | + /** Unset — explorer declares no skill scope. */ |
| 18 | + readonly optionalSkills?: readonly string[]; |
| 19 | + readonly tools: { |
| 20 | + readonly allow: readonly string[]; |
| 21 | + }; |
| 22 | + readonly spawn: { |
| 23 | + readonly maySpawn: false; |
| 24 | + }; |
| 25 | + readonly modelRole: "explore"; |
| 26 | + readonly tier: "leaf"; |
| 27 | +}; |
| 28 | + |
| 29 | +const EXPLORER_TOOLS = [ |
| 30 | + "read_file", |
| 31 | + "grep", |
| 32 | + "search_files", |
| 33 | + "list_dir", |
| 34 | + "lsp", |
| 35 | + "run_shell", |
| 36 | + "web_fetch", |
| 37 | + "web_search", |
| 38 | + "skill_search", |
| 39 | + "use_skill", |
| 40 | +] as const; |
| 41 | + |
| 42 | +export const explorerPackage: AgentPackage = { |
9 | 43 | id: "explorer", |
10 | 44 | primaryIntent: "Map and read the codebase; no product edits", |
11 | 45 | outOfLane: [ |
@@ -33,7 +67,7 @@ FINDINGS SHAPE: Findings must be a scannable map — key paths, symbols, call fl |
33 | 67 | FINISH BIAS: Prefer one thorough pass then report. Expand Findings, change approach, or write the final report — do not keep re-reading the same paths. |
34 | 68 |
|
35 | 69 | OUT OF LANE: product writes, drive-by fixes, shipping features, review severity theater, orchestration, spawning specialists, fleet discovery, becoming Coder/Reviewer/orchestrator as primary.`, |
36 | | - tools: { allow: READ_TOOLS }, |
| 70 | + tools: { allow: [...EXPLORER_TOOLS] }, |
37 | 71 | spawn: { maySpawn: false }, |
38 | 72 | tier: "leaf", |
39 | 73 | modelRole: "explore", |
|
0 commit comments